Answer (Choose 1 answer)
Which statement is true about this code?
1. class A
private static int x = 100;
2. { 3.4.2345
5. public static void main(String args[])
6.
7.8.A t = new A();tx++;
9.10.A h = new A();h.x++;
11.h = new A();
12.13.h.x++;A.x++;
14.System.out.println("x = " + x);
15.
16.}
}
A. Line 8 will not compile because it is a static reference to a private variable.
B. Line 13 will not compile because it is a static reference to a private variable.
C. The program compiles and the output is x = 102.
D. The program compiles and the output is x = 103.
E. The program compiles and the output is x = 104.
Finish Save at server failed!. Please inform the supervisor and continue the exam.
Eut