Sorry, this is a Java newbie question.. Does it make sense to create a subpackage that needs to import the "super" package? This is possible but is it something that is usually done / logical to do?
Thanks.
EDIT: what about the other way around? Packages that import their subpackages?
There is no such thing as a "subpackage" in Java.
Despite the appearance that com.example.some and com.example.some.thing are related (and the practical fact that thing is likely a subdirectory inside com/example/some), there is no super/sub relationship between them.
They are just two separate packages. If you want to use things from one package in the other package, you have to either import or fully qualify the name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With