To understand Garbage collection mechanism we must know about the various reference types for object because on that basis the GC reclaim the memory from the object There are following 4 kinds of reference types in Java: Strong references. Weak references. Soft references. Phantom references. Strong reference: It is most simple as we use it in day to day programming. if not differently specified then an object is a strong Reference Object Ex String language="English"; A new string object will be created and a strong reference to it would be stored in the variable 'language'; If any object has a strong reference or it is reachable by any chain of strong reference then JVM will not garbage collect it to avoid any situation where it destroy the object which is currently being worked upon. Weak reference: These are created using WeakReference class which is present in the java.lang.ref . Weak...