PRO192_-_FA_2023_-_RE_1159.webp
Hoàng Nam

PRO192_-_FA_2023_-_RE_1159.webp

(Choose 1 answer)
1. class A
Which statement is true about this code?
2. {
private static int x = 100;
23456
public static void main(String args[])
{ A t = new A();
プ。7.
8.tx++;
9.A h = new A();
10.h.x++;
11.h = new A();
12.h.x++:
13.
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.

Exit 15

Thông tin

Category
PRO192
Thêm bởi
Hoàng Nam
Ngày thêm
Lượt xem
4,077
Lượt bình luận
21
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_FA_2023_-_RE_1159.webp
File size
60.5 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom