单项选择题
给出下面代码段:x处于什么范围时打印字符串“second”。 ( )
public class forLoopStatement
public static void main(String[]args)
int x=______;//给x赋值
if(x>0)System.out.println("first");
else if(x>-3)System.out.println("second");
elseSystem.out.println("third");
A.x>0
B.x>-3
C.x<=-3
D.x<=0&x>-3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
类A定义如下: class A private int x=10; int getx() return x; class B extends A private int x=15; 需要覆盖getx()方法 在下述方法中可以在类B中覆盖getx()方法的是 ( )
A.int getx()…
B.int getx(floatf)…
C.float getx()…
D.double getx(floatf)…
点击查看答案&解析
单项选择题
在编程需要导入包时,语句package com.cwch.jzb应出现在 ( )
A.需要引进类的末尾
B.在需要引进类的开头
C.在程序的开始
D.在jzb包的开始
点击查看答案&解析
相关试题
已知有下面的类说明: public class Tes...
下列程序中的循环体将会被执行 ( ) pu...