摘要: String s1 = "abc"; String s2 = "abc"; System.out.printIn(s1==s2); true. //常量池中不会存储连个想用的字符串,所以s1和s2都指向了常量池中相同的字符串,所以有相同的地址。 String s3 = new String("abc 阅读全文
posted @ 2021-11-30 16:58 Boerk 阅读(126) 评论(0) 推荐(0)