单项选择题
public class foo {
public static void main (string[]args)
try {return;}
finally {system.out.printIn(“Finally”);}
}
What is the result?()
A. The program runs and prints nothing.
B. The program runs and prints “Finally”
C. The code compiles, but an exception is thrown at runtime.
D. The code will not compile because the catch block is missing.
点击查看答案&解析
相关考题
-
多项选择题
switch (i) { default: System.out.printIn(“Hello”); ) What are the two acceptable types for the variable i?()
A. Char
B. Byte
C. Float
D. Double
E. Object -
单项选择题
int i= 1, j= 10 ; do ( if (i++> --j) continue; ) while (i<5); After execution, what are the values for I and j?()
A. i = 6 and j= 5
B. i = 5 and j= 5
C. i = 6 and j= 4
D. i = 5 and j= 6
E. i = 6 and j= 6 -
单项选择题
1. public class test ( 2. public static void main(string args[]) { 3. int 1= 0; 4. while (i) { 5. if (i==4) { 6. break; 7. } 8. ++i; 9. } 10. 11. } 12. ) What is the value of i at line 10?()
A. 0
B. 3
C. 4
D. 5
E. The code will not compile.
