day09-抽象方法和抽象类的使用以及注意事项

This commit is contained in:
2026-07-25 15:52:53 +08:00
parent 97859a5d20
commit 1997cf8be2
5 changed files with 65 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
package com.inmind.abstract07;
public class Cat extends Animal{
//对抽象父类的抽象方法进行具体的实现
@Override
public void eat() {
System.out.println("猫吃鱼");
}
}