可能重复:
Java 包 com 和 org
我是一名 Java 开发人员.现在我正在学习 struts,在阅读教程时,我的脑海中突然出现了一种关于
I am a java developer. Nowadays I am learning struts and when reading a tutorial a curiosity intruded in my mind regarding
package com.something.something;
我知道这是一个非常简单的包声明,但是呢
I know it is a very simple package declaration but what about
package **com**.something.something;
这个包名称片段经常出现在许多商业发行版中.现在我想知道这是什么意思?请澄清一下.
This package name fragment often comes in many commercial distributions. Now I want to know what does it mean? Please clarify it.
谢谢,如果我不能澄清它,我很抱歉......
Thanks and sorry if I couldn't clarify it...
只是为了避免类名冲突的命名空间定义.com.domain.package.Class
是一个既定的 Java 约定,其中命名空间与公司域相反.
It's just a namespace definition to avoid collision of class names. The com.domain.package.Class
is an established Java convention wherein the namespace is qualified with the company domain in reverse.
这篇关于为什么包名经常以“com"开头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!