标签:
http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html
package peoplePack; public class JavaApp { public static void main(String[] args) { Young y = new Young(); y.action(); } } abstract class People { abstract void action(); public void eat(){ System.out.println("People eats"); } } class Young extends People{ public void action(){ System.out.println("Young Runs"); } public void eat(){ System.out.println("Young eats"); } }
标签:
原文地址:http://www.cnblogs.com/liangnote/p/4295096.html