单选题

Given:   11. public void genNumbers() {   12. ArrayList numbers = new ArrayList();   13. for (int i=0; i<10; i++) { 14. int value = i * ((int) Math.random());   15. Integer intObj = new Integer(value);   16. numbers.add(intObj);   17. }   18. System.out.println(numbers);   19. }   Which line of code marks the earliest point that an object referenced by intObj becomes a  candidate for garbage collection?()

A Line 19

B The object is NOT a candidate for garbage collection.

C Line 17

D Line 16

E Line 18

正确答案

来源:www.examk.com

答案解析

相似试题
  • Given: Which two, inserted at line 11, will allow the code to compile?()

    多选题查看答案

  • Given: When line 11 is reached, how many objects are eligible for garbage collection?()

    单选题查看答案

  • Given: 11.String test = "This is a test"; 12.String[] tokens = test.split("/s"); 13.System.out.println(tokens.length); What is the result?()

    单选题查看答案

  • Given 11.public interface Status { 12. int MY_VALUE = 10; 13.} Which three are valid on line 12?()

    多选题查看答案

  • Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()

    单选题查看答案

  • Given:   11. String test = "This is a test";   12. String[] tokens = test.split("/s");   13. System.out.println(tokens.length);   What is the result?()

    单选题查看答案

  • Given: 10.interface Data { public void load(); } 11.abstract class Info { public abstract void load(); }  Which class correctly uses the Data interface and Info class?()

    单选题查看答案

  • Given: 11.double input = 314159.26; 12.NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN); 13.String b; 14.//insert code here Which code, inserted at line 14, sets the value of b to 314.159,26?()

    单选题查看答案

  • Given: 11.double input = 314159.26; 12.NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN); 13.String b; 14.//insert code here Which code, inserted at line 14, sets the value of b to 314.159,26?()

    单选题查看答案