PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp
T

PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp

(Choose 1 answer)
What is the output of this program?
1.class Box {
2.
int a;
3.int b;
4.
5. }
int c;
6.class Mainclass {
7.
public static void main(String args[])
8.{
9.Box x = new Box();
10.11.Box y;x.a = 2;
12.x.b = 4;
13.x.c = 1;
14.y = x;
15.System.out.println(y.a);
16.}
17. }
A. 2
B. 4
C. Runtime error
D. Compile error

Thông tin

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

Image metadata

Filename
PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp
File size
177.4 KB
Dimensions
1920px x 1012px

Share this media

Back
Bên trên Bottom