user image

Pooja Sharma

Job Interview Skills
English
2 years ago

26. Does importing a package imports the subpackages as well? Example: Does importing com.MyTest.* also import com.MyTest.UnitTests.*?

user image

Abhishek Mishra

2 years ago

No you will have to import the subpackages explicitly. Importing com.MyTest.* will import classes in the package MyTest only. It will not import any class in any of it's subpackage.

Recent Doubts

Close [x]