fix typo and format code

This commit is contained in:
金戟 2021-10-27 07:33:08 +08:00
parent 682d822249
commit aee2ec2767
3 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color;
public class DemoInherit { public class DemoInherit {
/** /**
* call method overridden by sub class via parent class variable * call method overridden by subclass via parent class variable
*/ */
public Box putIntoBox() { public Box putIntoBox() {
Box box = new BlackBox(""); Box box = new BlackBox("");
@ -20,7 +20,7 @@ public class DemoInherit {
} }
/** /**
* call method overridden by sub class via sub class variable * call method overridden by subclass via subclass variable
*/ */
public BlackBox putIntoBlackBox() { public BlackBox putIntoBlackBox() {
BlackBox box = new BlackBox(""); BlackBox box = new BlackBox("");
@ -37,7 +37,7 @@ public class DemoInherit {
} }
/** /**
* call method defined in parent class via sub class variable * call method defined in parent class via subclass variable
*/ */
public String getFromBlackBox() { public String getFromBlackBox() {
BlackBox box = new BlackBox("data"); BlackBox box = new BlackBox("data");
@ -53,7 +53,7 @@ public class DemoInherit {
} }
/** /**
* call method defined in interface via sub class variable * call method defined in interface via subclass variable
*/ */
public String getColorViaBox() { public String getColorViaBox() {
BlackBox box = new BlackBox(""); BlackBox box = new BlackBox("");
@ -61,7 +61,7 @@ public class DemoInherit {
} }
/** /**
* call method defined in interface via sub class variable * call method defined in interface via subclass variable
*/ */
public String getColorIdxViaColor() { public String getColorIdxViaColor() {
Color color = new BlackBox(""); Color color = new BlackBox("");

View File

@ -1,6 +1,6 @@
package com.alibaba.demo.basic.model.mock; package com.alibaba.demo.basic.model.mock;
public interface Color extends BasicColor{ public interface Color extends BasicColor {
String getColor(); String getColor();

View File

@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color
class DemoInherit { class DemoInherit {
/** /**
* call method overridden by sub class via parent class variable * call method overridden by subclass via parent class variable
*/ */
fun putIntoBox(): Box { fun putIntoBox(): Box {
val box: Box = BlackBox("") val box: Box = BlackBox("")
@ -20,7 +20,7 @@ class DemoInherit {
} }
/** /**
* call method overridden by sub class via sub class variable * call method overridden by subclass via subclass variable
*/ */
fun putIntoBlackBox(): BlackBox { fun putIntoBlackBox(): BlackBox {
val box = BlackBox("") val box = BlackBox("")
@ -38,7 +38,7 @@ class DemoInherit {
} }
/** /**
* call method defined in parent class via sub class variable * call method defined in parent class via subclass variable
*/ */
val fromBlackBox: String? val fromBlackBox: String?
get() { get() {
@ -56,7 +56,7 @@ class DemoInherit {
} }
/** /**
* call method defined in interface via sub class variable * call method defined in interface via subclass variable
*/ */
val colorViaBox: String val colorViaBox: String
get() { get() {