Where does the Static members reside in memory,is it permanent generation?
This question already has an answer here:
static members : permanent generation(heap)
local variable : stack memory which is not heap. refer here http://tutorials.jenkov.com/java-concurrency/java-memory-model.html
It depends on the Java version you are using:
PermGen
. It's simply part of the memory model like young gen and old gen. Metaspace
, which resides inside native memory (so outside Java heap). 上一篇: DVM中的永久代
下一篇: 静态成员在内存中的位置是永久生成的吗?