SCJP考试题310-025(第二套)92-147/147
百度广告
QUESTION NO: 92
1. String foo = "blue";
3. if (bar[0]) {
5. }
A. Foo has the value of ""
C. Foo has the value of "blue"
E. An exception is thrown.
Answer: F
Exhibit:
2. public static void main (String[]args) {
4. Boolean b1 = new Boolean (true);
6. System.out.printIn("Equal");
8. }
What is the result?
B. The program runs and prints "Equal"
D. The program runs but aborts with an exception.
QUESTION NO: 94
1. public class Foo {
3. int i = 1;
5. if ((i>++j) && (i++ ==j)) {
7. }
9. }
A. 1
C. 3
E. 5
QUESTION NO: 95
1. public class X {
3. string s = new string ("Hello");
5. System.out.printIn(s);
7.
9. s += "world!";
11. }
E. The program runs and prints "Hello"
G. The program runs and prints "Hello world!"
Answer: A
QUESTION NO: 96
A. 16>4
C. 16*4
>2
F. 16>>>2
QUESTION NO: 97
1. public class X {
3. int [] a = new int [1]
5. System.out.printIn(a[0]);
7.
9. a[0] ++;
11. }
A. The program runs and prints "0"
C. The program runs but aborts with an exception.
E. An error "possible undefined variable" at line 9 causes compilation to fail.
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>