常用包装类的缓存分析

Integer Long缓存知识我们都知道Integer是一个int类型的包装类,具有缓存-128-127.这里通过源代码展示下为什么是这个区间的缓存值/** * Cache to support the object identity semantics of autoboxing for