I know Java objects, instance variables are created and live in the heap, while the local variables and object references are created and live in the stack.
What about the “class” itself where does it live?
Am asking this because when you create static variables you call them using the class name,
e.g.
Math.round()
When Math class is created, where does it live in memory (heap or stack)
Gath
Java classes lives in
Permanent Generation heap.Also the interned string pool is stored here.Permanent Generation heap contains: