常量池和堆的區別

public class StringTest02 { public static void main(String[] args) { //在字符串常量池 String s1 = "hello"; String s2 = "hello";  String s=aaa"+"bbb"+"ccc"常量池 //因爲使用了字符串常量池 System.out.println(s1 == s2); Syste
相關文章
相關標籤/搜索