public class Test {
public static void main(String[] args) {
String s1 = “Hello”;
String s2 = s1;
s1 += ” World”;
StringBuilder sb1 = new StringBuilder(“Hello”);
StringBuilder sb2 = sb1;
sb1.append(” World”);
System.out.print(s2);
System.out.print(sb2);
}}
问题: 程序的输出结果是什么?
点点赞赏,手留余香
给TA打赏




评论0