A.equals(Object) B.trim() C.round() D.toString()
public class Holt extends Thread{ private String sThreadName; public static void main(String argv[]){ Holt h = new Holt(); h.go(); } Holt(){} Holt(String s){ sThreadName = s; } public String getThreadName(){ return sThreadName; } public void go(){ Holt first = new Holt("first"); first.start(); Holt second = new Holt("second"); second.start(); } public void start(){ for(int i = 0; i < 2; i ++){ System.out.println(getThreadName() +i); try{ Thread.sleep(100); } catch(InterruptedException e){ System.out.println(e.getMessage()); } } } } 當(dāng)編譯運行上面的Java代碼時,將會出現(xiàn)()。
A.編譯時錯誤 B.輸出first0, second0, first0, second1 C.輸出first0, first1, second0, second1 D.運行時錯誤
public class test3 { public static void main(String args[]) { for(int i = 0; i < 3; i++) { for(int j = 3; j >= 0; j--) { if(i == j) continue; System.out.println("i="+ i + " j="+j); } } } } 上面的Java代碼編譯運行后,下列選項中,()會出現(xiàn)在輸出結(jié)果中。
A.i=0 j=3 B.i=0 j=0 C.i=2 j=2 D.i=0 j=2 E.i=1 j=2