abstract class GetTime {
final void getTime(){
long start=System.currentTimeMillis();
this.runCode();
long end=System.currentTimeMillis();
System.out.print("运行时间为:"+(end-start));
System.out.println();
}
public abstract void runCode();//变化部分
abstract class GetTime {
final void getTime(){
long start=System.currentTimeMillis();
this.runCode();
long end=System.currentTimeMillis();
System.out.print("运行时间为:"+(end-start));
System.out.println();
}
public abstract void runCode();//变化部分