publicclassHoltextendsThread{privateStringsThreadName;
publicstaticvoidmain(Stringargv[]){
Holth=newHolt();
h.go();}
Holt(){}
Holt(Strings){
sThreadName=s;}
publicStringgetThreadName(){
returnsThreadName;}
publicvoidgo(){
Holtfirst=newHolt("first");
first.start();
Holtsecond=newHolt("second");
second.start();}
publicvoidstart(){
for(inti=0;i<2;i++){
System.out.println(getThreadName()+i);
try{
Thread.sleep(100);}
catch(InterruptedExceptione){
System.out.println(e.getMessage());
}
}}}
当编译运行上面的Java代码时,将会出现()。