Stephan van Hulst wrote:I'm not exactly sure, but I believe they are stored in an instance of the Class class.
ocpjp 6.0 certified.
amit mandal wrote:They are stored in the Class object associated with that class.
amit mandal wrote:Instances of Class are also stored on the heap called "permanent generation".
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
ocpjp 6.0 certified.
amit mandal wrote:you can read it here even though its bit confusing
:
permanent generation
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
mohamed sanaullah wrote:
amit mandal wrote:you can read it here even though its bit confusing
:
permanent generation
Thanks for sharing the article![]()
ocpjp 6.0 certified.
swaraj gupta wrote:I have recently gone through an article on the same and according to that:
" Whenever a process is loaded in the RAM, we can say that the memory is roughly divided into three areas (within that process):
1> Stack
2> Heap
3> Static.
The Static which is also a part of heap is used for storing static members and is also called "High Frequency Heap."
But I have a doubt, if static members exist on heap then when does the garbage collector sweep them off the heap or it wouldn't consider them?
swaraj gupta wrote:But I have a doubt, if static members exist on heap then when does the garbage collector sweep them off the heap or it wouldn't consider them?
mohamed sanaullah wrote:
swaraj gupta wrote:But I have a doubt, if static members exist on heap then when does the garbage collector sweep them off the heap or it wouldn't consider them?
I think when ever the class is unloaded by the JVM.
Don't get me started about those stupid light bulbs. |