欢迎光临散文网 会员登陆 & 注册

区块内研社实操之CEX

2022-12-08 21:11 作者:呵呵呵呵呵sp  | 我要投稿
  • case => String.intern() | Integer.valueOf() => IntegerCache

public class Flyweight {    public static void main(String[] args) {        // i 和 j 两个对象是一模一样的 => 因为有缓存 -128 - 127 都被缓存下来了        Integer i = 1;        Integer j = 1;    }}


区块内研社实操之CEX的评论 (共 条)

分享到微博请遵守国家法律