package test;
import org.omg.IOP.Codec;
import org.w3c.dom.DOMError;
public class Test02 {
public static void main(String[] args) {
// TODO 自动生成的方法存根
Demo dm=new Demo();
dm.getTime();
}
}
abstract class GetTime{
public final void getTime(){
long start=System.currentTimeMillis();
code();
long end=System.currentTimeMillis();
System.out.println("程序运行的时间是:"+(end-start));
}
public void code(){};
}
class Demo extends Test02{
public void getTime(){
}
public void code() {
for(int x=0;x<10000;x++){
System.out.println("x:"+x);
}
}
} |
|