InterviewSolution
Saved Bookmarks
| 1. |
In case a package has sub packages, will it suffice to import only the main package? e.g. Does importing of com.myMainPackage.* also import com.myMainPackage.mySubPackage.*? |
|
Answer» This is a big NO. We need to understand that the importing of the sub-packages of a package needs to be done EXPLICITLY. Importing the PARENT package only results in the IMPORT of the classes WITHIN it and not the contents of its child/sub-packages. |
|