Answer (Choose 1 answer)
What is the output of this program?
class Box {
int a;
int b;
int c;
}
123456789
class Mainclass {
public static void main(String args[])
{
Box x = new Box();
10.Box y;
11.12.x.a = 2;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
}
Iv
Exit 22