Given the code fragments:
Which modification enables the code to compile?
A. Replace line n1 with: import p1.*;
Replace line n2 with: import p1. p2*;
B. Replace line n1 with: import p1.A;
Replace line n2 with: import p1.*;
C. Replace line n1 with:
import p1. A;
Replace line n2 with:
import p1. A;
import p1. p2.B;
D. Replace line n1 with:
import p1;
Replace line n2 with:
import p1;
import p1. p2;
C:
but to compile you manually have to create folder p1 and copy there “A.java” file, then create p2 folder inside p1 and copy there “B.java” file. Afterwards compilation will be successful :
# javac C.java
C