![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
城志
这个作者很懒,什么都没留下…
展开
-
创建String对象的方法和内存使用
以下分析基于HotSpot虚拟机 注意jdk1.7以上的两个变化: 虚拟机内存中,常量池由方法区转移到堆。 String.intern(),如果常量池存在等于此String对象的字符串,则返回该常量池中对象的引用;否则,在常量池中生成一个对原字符串的引用,并返回该引用,而不会再将字符串拷贝到常量池(jdk1.6)。 new String 在堆上创建字符串对象,调用String类的有参...原创 2020-03-03 15:47:00 · 69 阅读 · 0 评论 -
变量类型
u8,,表示unsigned char,占8位 u16,表示unsigned short,占16位 u32,表示unsigned int ,占32位 u64,表示unsigned int,占64位 long,32位占4个字节,64位系统上,windows系统使用ILL,L始终占32位,unix 64系统L占64位。 编程时最好用sizeof测试长度。 参考:https://blog.csdn.ne...原创 2019-05-13 11:36:40 · 167 阅读 · 0 评论