转载

java中的类名约定

java

中类的命名约定是什么,例如,所有类都应该是大写,如MYCLASS.java?

像com.sun.org.apache.bcel.internal.generic这样的一些类. ANEWARRAY.也可以在Sun的图书馆找到

注意:我已经阅读了 Oracle 的所有命名约定,但我找不到任何说明我们应该用All Uppercase命名的类.

类名应该在CamelCase中.尝试使用名词,因为一个类通常代表现实世界中的某些东西.

Documentation 声明如下:

Class names should be nouns, in mixed case with the first letter of  each internal word capitalized. Try to keep your class names simple  and descriptive. Use whole words-avoid acronyms and abbreviations  (unless the abbreviation is much more widely used than the long form,  such as URL or HTML).

翻译自:https://stackoverflow.com/questions/16537620/class-name-convention-in-java

原文  https://codeday.me/bug/20190113/523695.html
正文到此结束
Loading...