diff --git a/demo/java-demo/src/main/java/com/alibaba/demo/basic/DemoInherit.java b/demo/java-demo/src/main/java/com/alibaba/demo/basic/DemoInherit.java index 3cd8af9..6ca6726 100644 --- a/demo/java-demo/src/main/java/com/alibaba/demo/basic/DemoInherit.java +++ b/demo/java-demo/src/main/java/com/alibaba/demo/basic/DemoInherit.java @@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color; 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() { 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() { 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() { 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() { 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() { Color color = new BlackBox(""); diff --git a/demo/java-demo/src/main/java/com/alibaba/demo/basic/model/mock/Color.java b/demo/java-demo/src/main/java/com/alibaba/demo/basic/model/mock/Color.java index 8338ddf..96f4847 100644 --- a/demo/java-demo/src/main/java/com/alibaba/demo/basic/model/mock/Color.java +++ b/demo/java-demo/src/main/java/com/alibaba/demo/basic/model/mock/Color.java @@ -1,6 +1,6 @@ package com.alibaba.demo.basic.model.mock; -public interface Color extends BasicColor{ +public interface Color extends BasicColor { String getColor(); diff --git a/demo/kotlin-demo/src/main/kotlin/com/alibaba/demo/basic/DemoInherit.kt b/demo/kotlin-demo/src/main/kotlin/com/alibaba/demo/basic/DemoInherit.kt index 98df1bc..c960414 100644 --- a/demo/kotlin-demo/src/main/kotlin/com/alibaba/demo/basic/DemoInherit.kt +++ b/demo/kotlin-demo/src/main/kotlin/com/alibaba/demo/basic/DemoInherit.kt @@ -11,7 +11,7 @@ import com.alibaba.demo.basic.model.mock.Color class DemoInherit { /** - * call method overridden by sub class via parent class variable + * call method overridden by subclass via parent class variable */ fun putIntoBox(): Box { 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 { 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? 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 get() {