I\'m reading about WeakReference in wikipedia and I saw this code
WeakReference
public class ReferenceTest { public static void main(String[] args) th
Static variables are Garbage Collected only when the class is unloaded. Therefore you can see that the value of the static variable is still printed even after you manually triggered garbage collection.