Java中的包和它的子包之间有什么关系? [英] What is the relationship between a package and its subpackage in Java?

查看:26
本文介绍了Java中的包和它的子包之间有什么关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
Java:子包的可见性?

这是Java:子包可见性?问题的延续.询问的原因是为了引起更广泛社区的关注.

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

问题 odp.proj 和 odp.proj.subpackage 这两个包之间有什么关系吗?

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.

推荐答案

不,Java语言中的odp.projodp.proj.subpackage之间没有关系看法.

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

对于代码,odp.proj.subpackage 将驻留在 odp.proj 的子目录中,并且一些工具和 IDE 可能会将它们组合在一个 UI 中,但对于语言访问控制或其他语言功能没有关系.

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 没有子包的概念,因此 odp.proj.subpackage 和 odp.proj 与任何其他不同命名的包一样彼此不同.

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.

这篇关于Java中的包和它的子包之间有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆