diff --git a/src/main/java/com/github/hcsp/Home.java b/src/main/java/com/github/hcsp/Home.java index 004c169..e938bab 100644 --- a/src/main/java/com/github/hcsp/Home.java +++ b/src/main/java/com/github/hcsp/Home.java @@ -11,5 +11,6 @@ public static void main(String[] args) { Cat white = new Cat(); white.name = "White"; white.sayName(); + } } diff --git a/src/main/java/com/github/hcsp/pet/Cat.java b/src/main/java/com/github/hcsp/pet/Cat.java index 163caaf..c4f7e47 100644 --- a/src/main/java/com/github/hcsp/pet/Cat.java +++ b/src/main/java/com/github/hcsp/pet/Cat.java @@ -6,5 +6,6 @@ public class Cat { public void sayName() { // Print itself's name to standard output (System.out) here // 在这里将自己的名字打印到标准输出(System.out) + System.out.println(this.name); } }