一题147求解
95
====
1. public class X {
2. public static void main (String[]args) {
3. String s = new String ("Hello");
4. modify(s);
5. System.out.println(s);
6. }
7.
8. public static void modify (String s) {
9. s += "world!";
10. }
11. }
What is the result?
A.The program runs and prints "Hello".
B.An error causes compilation to fail.
C.The program runs and prints "Hello world!".
D.The program runs but aborts with an exception.
为什么选A 而不选C?static不是引用地址,会改变的吗?