String a="hello"; 声明一个String类型的 变量,变量的值是hello String a = new String("hello");是声明一个String类型的对象,对象的内容是hello String a="hello"; a是放在内存常量区 String a = new String("hello");是放在内存堆空间里
String a="hello"; 声明一个String类型的 变量,变量的值是hello String a = new String("hello");是声明一个String类型的对象,对象的内容是hello String a="hello"; a是放在内存常量区 String a = new String("hello");是放在内存堆空间里