class father{   void method(){
     System.out.println("father.amethod()");
}}
class son extends father{
     int n=6;
     void method(){
     System.out.println("测试覆盖:son.amethod()");
}
   void fun(double d){
     System.out.println("d="+d);
}
}
public class TestD extends son{
     String m = "fgdsfgfdg";
     void shuchu(){
     //System.out.println("测试super"+super.fun(3.14));
     System.out.println("测试this:"+this.m);
     System.out.println("测试super:"+super.n);
}
     void fun(int i){
     System.out.println("测试重载:i="+i);
}
public static void main(String []args){
     father f1 = new father();
     father f2 = new son();
     f1.method();
     f2.method();//多态,覆盖
     TestD td = new TestD();
     td.shuchu();
     son s = new TestD();
     //TestD s = new TestD();
     s.fun(454);
     }
}