Introduction to Garbage collection.
Garbage collection is a service that can be provided by the Java Virtual Machine to reclaim memory that is eligible for reclamation. All editions of Java (J2ME, J2SE, and J2EE) are capable of providing this service. Unlike C++ there is no way to manually delete allocated memory. The application must leave memory management in the capable hands of the JVM. For this reason there is no concept of a pointer in Java. A pointer would allow access to memory arbitrarily and this would introduce possible issues for the gc and other aspects of the JVM