面试之new创建对象和用字符串常量创建对象的区别

public class StringDemo2 { public static void main(String[] args) { String s1 = new String("hello"); String s2 = "hello"; System.out.println(s1 == s2);// false Syst
相关文章
相关标签/搜索