HansonQ
//抽象的person
public abstract class Person {
public abstract void say();//抽象方法
}
public class Son extends Person {
@Override
public void say() {
System.out.println("........");
}
}
public class Demo{
public static void main(String[]args)throws Exception{
Person p=null;//引用变量p
p =new Son();//任何累继承了Person都可以来实例化
}
}