- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
java内存(Java Memory)
java内存(Java Memory)
About the internal work of String STR = ABC. Within the Java, translate this statement into the following steps:
(1) first define an object reference variable named STR for the String class: String str;
(2) finds that there is no stored value ABC address on the stack, if not, then opened a store literal ABC address, then create a new String object of class o, and the o string value to the address on the stack, and next to this address write down the reference object o. If you already have an address that is worth ABC, look for the object o and return the address of the o.
(3) point the STR to the address of the object o.
Continue the JVM principle
Original title: thinking about Java stacks and heaps, the 1. stack (stack) and the heap (heap) are all places where Java stores data in Ram. Unlike C++, Java automatically manages stacks and heaps, and programmers cant directly set up stacks or heaps. The advantage of the 2. stack is that the access speed is faster than the heap, second only to the register directly located in the CPU. But the downside is that the data size and lifetime in the stack must be determined and lack of flexibility. In addition, stack data can be shared, see third points. The advantage of a heap is the ability to dynamically allocate memory sizes without having to tell the compiler in advance, and the Java garbage collector automatically takes out the data that is no longer in use. The downside is that access is slower because of the dynamic allocation of memory at runtime. There are two types of data in Java 3. One is the basic type (primitive types), a total of 8 kinds, namely, int, short, long, byte, float, double, string, Boolean, char (note, and there is no basic type of C + +). This type of definition is defined by a form such as int, a = 3, long, B = 255L, and is called an automatic variable. It is important to note that automatic variables store literals, not instances of classes, that are not references to classes, an
您可能关注的文档
- 2房地产销售技巧-地产营销中的三十六计(2 real estate selling skills - thirty-six in real estate marketing).doc
- 338-广东省2012届高校毕业生系列供需见面活动(338- Guangdong 2012 college graduates series supply and demand meet).doc
- 34份水库移民后期扶持政策文件今解密(34 reservoir immigration policy documents to support the late declassified).doc
- 35岁以前成功的12条黄金法则(12 golden rules of success before the age of 35).doc
- 35simn钢板(35simn钢板).doc
- 36当代大学生思想状况及教育实践-陆士桢(36 contemporary college students' Ideological Status and educational practice - Lu Shizhen).doc
- 3、如何理解近代以来无数仁人志士探索国家出路的艰辛历程及其历史意义(3, how to understand the hardships of modern history of countless men and women with high ideals to explore the national way and its historical significance).doc
- 3t6管控12要点(不含售前四步法介绍)]测试题(3T6 control 12 points (without pre-sale, four steps introduction) test questions).doc
- 360°解析杜曼早教及如何使用闪卡【(360 degrees parsing Du early education and how to use flash card).doc
- 3_15品牌生活的卫道士(3_15 brand life guard).doc
文档评论(0)