题目内容

考虑如下两语句:1. boolean passingScore = false && grade == 70;2. boolean passingScore = false & grade == 70;表达式grade == 70 在什么地方被计算

A. 在 1 和 2中均计算
B. 在 1 和 2中均未计算
C. 在1中计算,在2中未计算
D. 在2中计算,在1中未计算
E. 非法,因为 false 应写 FALSE

查看答案
更多问题

以下程序的运行结果为:public class Test{public static void main(String argv[ ]){System.out.println("x="+ 5、;}}

A. 5
B. x=5
C. "x="+5
D. "x="5

设有如下变量char c = 'c';int i = 10;double d = 10;long l = 1;String s = "Hello";以下哪些语句编译不出错?

A. c=c+i;
B. s+=i;
C. i+=s;
D. c+=s;

以下代码的输出结果?public class Test{int x=3;public static void main(String argv[]){int x= 012;System.out.println(x);}}

A. 12
B. 012
C. 10
D. 3

执行下列代码后输出结果为:public class test {public static void main(String args[]) {int a=2;int b=3;int c=7;int d=a>c?a:c;d=d>>2>b? d:b;System.out.println(b);}}

A. 2
B. 3
C. 5
D. 7

答案查题题库