问二:你了解JAVA的内存模型(JMM)吗?

原理图:

    

注:java8中,已经将常量池移动到堆中

 

部件详解:

 

 

举例:执行add(1,2)

Method area is created on virtual machine startup, shared among all Java virtual machine threads and it is logically part of heap area. It stores per-class structures such as the run-time constant pool, field and method data, and the code for methods and constructors.

 

 

 

 

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务