![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
静心观复
这个作者很懒,什么都没留下…
展开
-
Java String‘s Immutability
Java String’s Immutability String pool (String intern pool) is a special storage area in Method Area. Since Strings are immutable in Java, the JVM optimizes the amount of memory allocated for them by ...原创 2019-08-21 18:12:06 · 198 阅读 · 0 评论 -
Java's Immutable Objects
An object is considered immutable if its state cannot change after it is constructed 一、Creating an Immutable Object 1. Don’t provide “setter” methods If you are building an immutable object its intern...原创 2019-08-22 11:25:19 · 280 阅读 · 0 评论 -
Deep, Shallow and Lazy Copy in Java
一、What Is a Copy? Reference Copy As the name implies, creates a copy of a reference variable pointing to an object. Object Copy An object copy creates a copy of the object itself. 二、What Is an Objec...原创 2019-08-22 14:46:36 · 464 阅读 · 0 评论