guyanqing 1 năm trước cách đây
mục cha
commit
568bd2856f

+ 8 - 8
src/main/java/com/sf/day10/homework/homework1/TestLiveAble.java

@@ -3,16 +3,16 @@ package com.sf.day10.homework.homework1;
 public class TestLiveAble {
     public static void main(String[] args) {
         // 创建实现类(子类)对象
-        Animal a = new Animal();
+        LiveAble liveAble = new Animal();
         // 调用实现后的方法
-        a.eat();
-        a.sleep();
-        a.breathe();
+        liveAble.eat();
+        liveAble.sleep();
+        liveAble.breathe();
         //创建实现类(子类)对象
-        Plant p = new Plant();
-        p.eat();
-        p.sleep();
-        p.breathe();
+        LiveAble liveAble1 = new Plant();
+        liveAble1.eat();
+        liveAble1.sleep();
+        liveAble1.breathe();
         //通过接口调用静态方法
         LiveAble.drink();
     }

BIN
target/classes/com/sf/day10/homework/homework1/TestLiveAble.class