2.14 Garbage Collection in Java
Introduction
Java manages memory automatically: once no reachable reference points to an object anymore, it becomes eligible for garbage collection, and the JVM's garbage collector reclaims its memory in the background. Unlike C/C++, Java programmers do not manually free object memory.