动手动脑4

1.

package text5;

public class text{

	   public static void main(String[] args){

	      father b = new son(); // Dog 对象
	      b.move(); //执行 Dog类的方法

	   }
	}

	class father{

	   public void move(){
	      System.out.println("father create");
	   }
	}

	class son extends father{

	   public void move(){
	      super.move(); // 应用super类的方法
	      System.out.println("son create");
	   }
	}

  

原文地址:https://www.cnblogs.com/dwx8845/p/11748030.html