I am sorry to ask you this basic question but I am not able to understand the concept.
I read many SO post but I could not understand. Could you please give me code example to understand.

1. As said in this [post](https://stackoverflow.com/questions/453023/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.
> 
> 
> 

I understand as per theory that Classloader cannot be collected if it has a reference but I do not understand how it is possible practically.
Could you please kindly explain with a code example?

Many thanks for your help!