单项选择题

阅读下面代码
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;

相关试题
  • 下面程序执行后,屏幕上显示的应是( )。...
  • 下列语句执行后,i的值是( )。 public...
  • 阅读下列代码 public class Test publi...
  • 下面程序的运行结果是( )。 public cl...
  • 假设i是int类型的变量,并初始化为1,则下...