Given the code fragments:
Which modification enables the code to compile?
A.
Replace line n1 with:
import p1.A;
Replace line n2 with:
import p1.A;
import p1.p2.B;
B.
Replace line n1 with:
import p1;
Replace line n2 with:
import p1;
import p1.p2;
C.
Replace line n1 with:
import p1.A;
Replace line n2 with:
import p1.*;
D.
Replace line n1 with:
import p1.*;
Replace line n2 with:
import p1.p2.*;
see question 24, why is the answer different ?
A
D
Answer: D
A y D