代码跟运行结果如下 public static void main(String[] agrs){
String s1 = new String("aaa");
String s2 = s1;
System.out.println("s1=" + s1);
System.out.println("s2=" + s2);
s1 = "bbb";
System.out.println("s1=" + s1);
System.out.println("s2=" + s2);
}s1=aaa
s2=aaa
s1=bbb
s2=aaa
添加回答
举报
0/150
提交
取消