What is the relationship between a package and its subpackage in Java?(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.proj和odp.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中的包和它的子包之间有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java中的包和它的子包之间有什么关系?
基础教程推荐
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
