单项选择题

下列程序的运行结果是( )。
Publicclasssun

Publicstaticvoidmain(Stringargs[])

intx=4,y=0;
if(Math.pow(x,2)=16)
y=X;
if(Math.pow(x,2)<15)
y=1/x
if(Math.pow(x,2)>15)
y=(int)Math.pow(x92)+1;
system,out.println(y);

A.4
B.17
C.18
D.0.25
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果是( ) 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
相关试题
  • HlelnputStream是字节流,BufferedWriter是...
  • 请阅读下列程序代码,然后将程序的执行结果...
  • break语句最常见的用法是在switch语句中,...
  • 当使用Threadt=mewThread(r)创建一个线...
  • 线程在生命周期中要经历5种状态,分别是新...