java进阶 抽象类30
![](https://img2023.cnblogs.com/blog/2140850/202303/2140850-20230310112409545-21940715.png)
package com.cyjt97.Abstract; public class Abstract { public static void main(String[] args) { } } abstract class a{ public abstract void eat(); } class b extends a{ public void eat(){ System.out.println("鱼"); } } class c extends a{ @Override public void eat() { System.out.println("肉"); } }
代码改变了我们,也改变了世界