I have come across this example from wikipedia regarding weak reference:
import java.lang.ref.WeakReference; public class ReferenceTest { public sta
If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
very well explained here