曹凯 发表于 2013-8-16 15:05:22

[Oracle interview]Does importing a package imports the subpackages as well?

e.g. Does importing com.MyTest.* also import com.MyTest.UnitTests.*?

于军 发表于 2013-8-16 15:20:07

No. youwill have to import the subpackages explicitly. Importing com.MyTest.* willimport classes in the package MyTest only. It will not import any class inany of it's subpackage.
页: [1]
查看完整版本: [Oracle interview]Does importing a package imports the subpackages as well?