java进阶 抽象类30
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("肉"); } }
代码改变了我们,也改变了世界