black

java工程师信产部认证考试

登录

单项选择题

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()) ;  } } } 
} 
当编译运行上面代码时,将会出现() 

A.编译时错误
B.输出first0,second0,first0,second1
C.输出first0,first1,second10,second1
D.运行时错误

相关考题

单项选择题 在j2ee中,某一Java程序中有如下代码:  DataInputStream din =new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat"))); System.out.print(din.readByte());  假设在employee.dat文件中只有如下一段字符:abcdefg.则:System.out在屏幕上打印()

多项选择题 关于ServletFilter,下列说法正确的有()

多项选择题 在J2EE中,Servlet从实例化到消亡是一个生命周期。下列描述正确的是()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064