Does importing a package imports the sub packages as well? E.g. Does importing com.bob.* also import com.bob.code.*? - JAVA Interview Questions

Does importing a package imports the sub packages as well? E.g. Does importing com.bob.* also import com.bob.code.*?


No you will have to import the sub packages explicitly. Importing com.bob.* will import classes in the package bob only. It will not import any class in any of its sub package’s.



Click Here to See Answer .....
Did you like this article ?
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.

0 comments:

Related JAVA Questions Posts