如调用时
Computuer com = new Computer ( ) ;
Flash flash = new Flash ( ) ;
com.transform(flash);
public void transform (USB usb){ //此时相当于 USB usb = new Flash
........
}
USB 为一个接口,Flash为实现USB的实现类,但接口不能实例化,需要借助实现类来创建对象
标签:体现,USB,多态性,Flash,接口,new,usb From: https://www.cnblogs.com/liujy2233/p/16823063.html