nerdexam
Oracle

1Z0-851 · Question #236

1Z0-851 Question #236: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #236. The question stem and answer options stay visible for context.

Question

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?

Options

  • ALine 16
  • BLine 17
  • CLine 18
  • DLine 19
  • EThe object is NOT a candidate for garbage collection.

Unlock 1Z0-851 to see the answer

You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-851 Practice