单项选择题

Given
1. public class Kaput {
2. Kaput myK;
3. String degree = "0";
4. public static void main(String[] args) {
5. Kaput k1 = new Kaput();
6. go(k1);
7. System.out.println(k1.degree);
8. }
9. static Kaput go(Kaput k) {
10. final Kaput k1 = new Kaput();
11. k.myK = k1;
12. k.myK.degree = "7";
13. return k.myK;
14. } }
What is the result

A.0
B.7
C.null
D.Compilation fails.
E.An exception is thrown at runtime.
题目列表

你可能感兴趣的试题

微信扫码免费搜题