publicclass Holt extends Thread{ privateString sThreadName; publicstatic void main(String argv[]){ Holt h= new Holt(); h.go(); } Holt(){} Holt(Strings){ sThreadName = s; } publicString getThreadName(){ returnsThreadName; } public voidgo(){ Holtfirst = new Holt("first"); first.start(); Holtsecond = new Holt("second"); second.start(); } public voidstart(){ for(inti = 0; i < 2; i ++){ System.out.println(getThreadName() +i); try{ Thread.sleep(100); } catch(InterruptedException E.{ System.out.println(e.getMessage()); }} }} 当编译运行上面的 Java 代码时,将会出现()。
B.
输出 first0,second0, first0, second1
C.
输出first0, first1,second0, second1