PRO192_FE_SP23_311.webp
Soram

PRO192_FE_SP23_311.webp

  • Media owner Soram
  • Ngày thêm
Bài viết gốc: Chủ đề 'PRO192 FE SP23'
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

Thông tin

Category
PRO192
Thêm bởi
Soram
Ngày thêm
Lượt xem
753
Lượt bình luận
7
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom