car2的類型為什么是Moveable而不是Car2
long endtime=System.currentTimeMillis();
System.out.println("汽車結束行駛…… 汽車行駛時間:"
+(endtime-starttime)+"毫秒!");
long endtime=System.currentTimeMillis();
System.out.println("汽車結束行駛…… 汽車行駛時間:"
+(endtime-starttime)+"毫秒!");
2017-08-02
舉報
2017-08-04
面對對象中的多態
2017-08-02
應為Car2實現的Moveable,向上塑型