WeakReference, SoftReference and PhantomReference are added to the Java API long back but have not effectively used by most of the programmers. The reason being the less knowledge on the concept of how these APIs work for managing the references. Basically these APIs are helping the Garbage Collector to claim the memory looking at the …