Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在java中,我们可以有一个与包名同名的类名吗?例如,
package abc; class abc{ }
注意:我知道类名应该以大写字母开头,所以在这种情况下请忽略它。
这完全没问题。您的班级abc将被称为abc.abc合格路径。
abc
abc.abc