其实这完全是理论上的问题.但有趣的是为什么 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 文档
包名全部小写以避免与类或接口的名称.
Package names are written in all lower case to avoid conflict with the names of classes or interfaces.
这篇关于java包名为什么要小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!