摘要: 编译期常量指的就是程序在编译时就能确定这个常量的具体值 非编译期常量就是程序在运行时才能确定常量的值,因此也称为运行时常量 //编译期常量 final int i = 4; final String str = "dasd"; // 非编译期常量 final String str1 = new St 阅读全文
posted @ 2022-07-21 22:27 无极是一种信仰 阅读(112) 评论(0) 推荐(0)
摘要: String类不可变:缓存,安全,线程安全,性能 substring jdk1.6 String(int offset, int count, char value[]) { this.value = value; this.offset = offset; this.count = count; 阅读全文
posted @ 2022-07-21 20:34 无极是一种信仰 阅读(43) 评论(0) 推荐(0)
摘要: 自动装拆箱原理: Integer integer=1; //装箱 int i=integer; //拆箱 反编译 Integer integer=Integer.valueOf(1); int i=integer.intValue(); 自动装拆箱场景: 放入集合类: List<Integer> l 阅读全文
posted @ 2022-07-21 20:09 无极是一种信仰 阅读(40) 评论(0) 推荐(0)