A.free() B.free(ServletConfig config) C.destroy() D.destroy(ServletConfig config)
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(){ Hot first=new Hot("first"); first.start(); Hot second=new Hot("second"); second.start(); } Public void start() { For(int i=0;i<2;i++) { System.out.print(getThreadName()+i); Try{ Thread.sleep(100); }catch(Exception e){ System.out.print(e.getMessage()) ; } } } } 當(dāng)編譯運(yùn)行上面代碼時,將會出現(xiàn)()
A.編譯時錯誤 B.輸出first0,second0,first0,second1 C.輸出first0,first1,second10,second1 D.運(yùn)行時錯誤
在j2ee中,某一Java程序中有如下代碼: DataInputStream din =new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat"))); System.out.print(din.readByte()); 假設(shè)在employee.dat文件中只有如下一段字符:abcdefg.則:System.out在屏幕上打?。ǎ?ensp;
A. a B. b C.97 D.98