Are static fields open for garbage collection?
Static variables cannot be elected for garbage collection while the class is loaded. They can be collected when the respective class loader (that was responsible for loading this class) is itself collected for garbage. Check out the JLS Section 12.7 Unloading of Classes and Interfaces A class or interface may be unloaded if and only … Read more