为什么java包名称应该小写? [英] Why should java package name be lowercase?
本文介绍了为什么java包名称应该小写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实际上这是完全理论上的问题。但有趣的是,为什么java规范不允许在包中使用大写字母字母并导致类似这样的写:
Actually this is completely theoretic question. But it's interesting why java specification don't allow uppercase characters letters in package and cause write something like this:
com.mycompany.projname.core.remotefilesystemsynchronization.*
而不是
com.myCompanyName.projName.core.remoteFileSystemSynchronization.*
推荐答案
直接来自 Oracle Docs
包名称全部用小写编写,以避免与类或接口的
名称冲突。
Package names are written in all lower case to avoid conflict with the names of classes or interfaces.
这篇关于为什么java包名称应该小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文