java中String的“==”和equals判断相等性
1. 首先String不属于8种基本数据类型,String是一个对象。 因为对象的默认值是null,所以String的默认值也是null;但它又是一种特殊的对象,有其它对象没有的一些特性。 2. new String()和new String(“”)都是申明一个新的空字符串,是空串不是null;3. String str=”kvill”与String str=new String ...