如果我没有与我相关的域名,我该如何命名包裹? [英] How should I name packages if I don't have a domain associated with me?
本文介绍了如果我没有与我相关的域名,我该如何命名包裹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
因此,大多数Java资源在提到软件包时都会提到 com.yourcompany.project
设置。但是,我不为公司工作,也没有网站。是否有常见的命名约定?也许是一个电子邮件地址?
So most Java resources when speaking of packages mention a com.yourcompany.project
setup. However, I do not work for a company, and don't have a website. Are there any naming conventions that are common? An email address, perhaps?
推荐答案
使用像'bernard'这样的顶级域名或其他独特的域名。重要的是,域名是唯一的,以便您避免冲突,而不是从一个真正的互联网顶级域名(如org或com)开始。例如,
Use a top-level domain like 'bernard' or something else unique. The important part is that the domain is unique so that you avoid clashes, and not that it starts with a real Internet top-level domain like org or com. E.g.
import java.util.*;
import bernard.myProject.*;
import org.apache.commons.lang.*;
这篇关于如果我没有与我相关的域名,我该如何命名包裹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文