试题来源:2014年计算机二级考试JAVA考前预测试卷1
【单选题】
下面程序段的输出结果是( )。
public class Test{
public static void main(String args[]){
int X,y;
x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2;
y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2;
if(x>v)
System.OUt.println("x>y");
elseif(x= =y)
System.out.println("x=Y");
else
System.out.println("x }
}
A.x>y
B.x=Y
C.x
D.编译错误
网考网参考答案:A
大数据分析:根据网考网与考试题库的统计分析,该试题:
11%的考友选择了A选项
42%的考友选择了B选项
8%的考友选择了C选项
39%的考友选择了D选项
考友解析与评论:
· 没读清题就选了,多么简单的一题啊
· 这个答案与百度百科里面的内容不符合
· 答案是什么啊,这题比较模糊
发布评论 查看全部评论