nerdexam
Oracle

1Z0-808 · Question #93

1Z0-808 Question #93: Real Exam Question with Answer & Explanation

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

Question

Given the code fragment: Which statement is true?
Class Student {
String name;
int age;
}

And,

1. public class Test {
2. public static void main(String[] args) {
3. Student s1 = new Student();
4. Student s2 = new Student();
5. Student s3 = new Student();
6. s1 = s3;
7. s3 = s2;
8. s2 = null;
9. }
10. }

Options

  • AAfter line 8, three objects are eligible for garbage collection.
  • BAfter line 8, two objects are eligible for garbage collection.
  • CAfter line 8, one object is eligible for garbage collection.
  • DAfter line 8, none of the objects are eligible for garbage collection.

Unlock 1Z0-808 to see the answer

You've previewed enough free 1Z0-808 questions. Unlock 1Z0-808 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-808 Practice