Return to site

JAVA CERTIFICATION QUESTION: When are Java objects eligible for garbage collection?

· java,ocp

This quiz is about your understanding of an object’s lifecycle, especially garbage collection.

Given the following class:

And given this code fragment:

When does the object created at line n1 become eligible for garbage collection? Choose one.

  • A. At line n2
  • B. At line n3
  • C. At line n4
  • D. At line n5
  • E. At line n6
  • F. None of the above




 ·ꓞ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ


All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!