多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

11. public static void append(List list) { list.add(”0042”); }  12. public static void main(String[] args) {  13. List intList = new ArrayList();  14. append(intList);  15. System.out.println(intList.get(0));  16. }  What is the result?() 

  • A、 42
  • B、 0042
  • C、 An exception is thrown at runtime.
  • D、 Compilation fails because of an error in line 13.
  • E、 Compilation fails because of an error in line 14.
正确答案:B
答案解析:
进入题库查看解析

微信扫一扫手机做题