可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

11. public static void


11. public static void main(String[] args) {  12. Integer i = uew Integer(1) + new Integer(2);  13. switch(i) {  14. case 3: System.out.println(”three”); break;  15. default: System.out.println(”other”); break;  16. }  17. }  What is the result?() 

  • A three
  • B other
  • C An exception is thrown at runtime.
  • D Compilation fails because of an error on line 12.
  • E Compilation fails because of an error on line 13.
  • F Compilation fails because of an error on line 15.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、static void test() thr

static void test() throws Error { if (true) throw new AssertionError(); System.out.print(test )...

2、public static void mai

public static void main(String[] args) { String str = null‟; if (str == null) {&ensp...

3、public static void par

public static void parse(String str) { try { float f= Float.parseFloat(str); } catch (NumberFo...

4、11. public void addStr

11. public void addStrings(List list) { 12. list.add(foo); 13. list.add(bar); 14. } What mus...

5、11. public void someMe

11. public void someMethod(Object value) { 12. // check for null value .... 20. System.out.pr...

6、11. public static void

11. public static void test(String str) { 12. if(str == null  str.lellgth() == 0) {&...