O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Section 3: Garbage Collection (Chapter 8)

  • State the behavior that is guaranteed by the garbage collection system.

  • Write code that explicitly makes objects eligible for garbage collection.

  • Recognize the point in a piece of source code at which an object becomes eligible for garbage collection.

Study Notes

There is no guarantee that any object will ever be garbage collected. An object becomes eligible for garbage collection when it has no references from running code. If a reference is reassigned, the object previously denoted by the reference now has one reference less, increasing this object's chances of becoming eligible for garbage collection. It is important to be able to identify where in the code an object will have no references during execution. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required