This code:
String s = "TEST";
String s2 = s.trim();
s.concat("ING");
System.out.println("S = "+s);
System.out.println("S2 = "+s2);
results in this output:
S = TEST
S2 = TEST
BUILD SUCCESSFUL (total time: 0 seconds)
Why are "TEST" and "ING" not concatenated together?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…