67,513
社区成员
发帖
与我相关
我的任务
分享
public class NullTest {
public static void main(String[] args) {
String str1=null;
String str2=null;
String str3=str1+str2;
System.out.println(str3);//问题1,别运行,打印什么?
//问题2,str3存储在哪?
//问题3System.out.println(str3==?);这里的?写什么才会打印true
}
}
public AbstractStringBuilder append(String str) {
if (str == null) str = "null";
int len = str.length();
ensureCapacityInternal(count + len);
str.getChars(0, len, value, count);
count += len;
return this;
}