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;
see question 32, why is the answer different ?
Answer: A
c correct since the * cant import the subpackage classes
Yes, i think you are right!
C