单项选择题
阅读下面代码
if(x==0) System. out. println("冠军");
else if(x>-3) System. out. println("亚军");
else System. out. println("季军");
若要求打印字符串"季军",则变量x的取值范围是( )。
A.x=0&x<=-3
B.x>0
C.x>-3
D.x<=-3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列( )是将一个十六进制值赋值给一个long型变量。
A.long number = 123L;
B.long number = 0123;
C.long number = 0123L;
D.long;number = 0x123L;
点击查看答案&解析
单项选择题
在下列源代码文件Test. java中,正确定义类的代码是( )。
A.pblic class test
public int x=0;
public test(int x)
this. x=x;
B.public class Test
public int x=0;
public Test(int x)
this. x=x;
C.public class Test extends T1,T2
public int x = 0;
public Test(int x)
this. x = x;
D.protected class Test extends T2
public int x = 0;
public Test(int x)
this. x = x;
点击查看答案&解析
相关试题
与显示相关的Applet方法有 【14】 ( ...
一个类只有实现了 【15】 接口,它的对...
【12】 是一个特殊的方法,是为对象初始...
public class Test public static voi...
在Java程序中,通过类的定义只能实现 【1...