单项选择题

下面程序段的输出结果是( )
classTest
publicstaticvoidmain(Stringargs[])
MyThreadt=newMyThread();
t.displayOutput("thasbeencreateD");
t.start();


ClassMyThreadextendsThread
publicvoiddisplayOutput(Strings)
System.out.println(S);

publicvoidrun()
displayOutput("tiSrunning.");

A.thasbeencreated.
B.thasbeencreated.
TiSrunning.
C.tiSrunning.
D.编译出错
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果为( )。 pubUCClassTeS public static voidmain(StringargS[]) booleaha,b,c; a=(3<5); b=(a==tme); System.Out.phntln( a= +a+ b= +b); c=(b==false); SyStem.out.println( b= +b+ C= +c);
A.a=tme b=falSe
B.a=true b=false
b=true c=false
b=true
C=tme
C.a=true b=true
D.a=falSe b=false
b=true c=falSe
b=tme
c=falSe
单项选择题
下列程序的输出结果是( )。 publicclassArrayTest publicstaticvoidmain(Stringargs[]) int[]intArray=newint[3] for(inti=0;i<3;i++) intArray[i]=i+2; system.out.println( IntArrayr[ +i+ ] =intArray[i]); System.out.println(“---------”); intarrLen=4; IntArray=newint[arrLen]; For(intj=intArray.length;j>=0;j--) intArray[j]=j*3; system.out.println( hello +intArray[j]);
A.编译未通过
B.编译通过,但运行错误
C.可以运行,但有错误
D.以上都不对
相关试题
  • HlelnputStream是字节流,BufferedWriter是...
  • 请阅读下列程序代码,然后将程序的执行结果...
  • break语句最常见的用法是在switch语句中,...
  • 当使用Threadt=mewThread(r)创建一个线...
  • 线程在生命周期中要经历5种状态,分别是新...