Which modification enables the code to compile?

Given the code fragments:

Which modification enables the code to compile?

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;



Leave a Reply 5

Your email address will not be published. Required fields are marked *


v10

v10

see question 32, why is the answer different ?

Hala

Hala

c correct since the * cant import the subpackage classes

renko

renko

Yes, i think you are right!