特牛网址导航

多线程学习三十一:不可变设计-CSDN博客

网友收藏
文章浏览阅读155次。大家更为熟悉的 String 类也是不可变的,以它为例,说明一下不可变设计的要素public final class String implements java.io.Serializable, Comparable<String>, CharSequence { private final char value[]; /** Cache the hash code for the str