字符串拼接问题 由于String类的对象内容不可改变,所以每当进行字符串拼接时,总是会在内存中创建一个新的对象。例如: public static void main(String[] args) { String s = "Hello"; s += "World"; System.out