Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the relationship between a package and its subpackage in Java? [duplicate]

Tags:

java

package

Possible Duplicate:
Java: Subpackage visiblity?

This is a continuation of question Java: Subpackage visiblity?. The reason for asking is to draw attention of broader community.

Question Is there any relation between two packages: odp.proj and odp.proj.subpackage?

Someone tried to answer it here but failed to describe it.

like image 933
Gaurav Agarwal Avatar asked Dec 21 '22 13:12

Gaurav Agarwal


1 Answers

No, there's no relation between odp.proj and odp.proj.subpackage from the Java language perspective.

For code, odp.proj.subpackage would reside in a sub directory of odp.proj, and some tools and IDE's might group them together in a UI, but regarding language access control, or other langage feature there's no relation.

Java does not have the concept of a subpackage, so odp.proj.subpackage and odp.proj are as different from each other as any other differently named packages.

like image 122
nos Avatar answered Jan 19 '23 00:01

nos