代码如下,为什么编译不了?
package execisetest;
class Demo extends Thread{
public void run(){
for(int i=0;i<100;i++){
System.out.println(this.getName());
}
}
}
public class DemoThread{
public static void main(String [] args){
Demo d=new Demo("demooooo");
d.start();
for(int i=0;i<100;i++){
System.out.println("hello world");
}
}
} |