基本Java命名规则
2004-09-27 18:48
357 查看
Java Class
1) ClassName VersionInfo History Copyright
2) Package
3) Import ( J2SE -> J2EE/J2ME -> Third Party Libs -> Self Common -> Self Specific)
4) Class Documentation for Javadoc
5) Class / Interface Statement
6) Class Implementation Detail Implementation
7) Static Variable (Public->Protected->Private)
8) Instance Variable (Public->Protected->Private)
9) Constructors (No-arg constructor first)
10) Methods (Grouped by accessibility or functionality)
Naming Convention
Package: All lower-case com.scs.common.reuse.searchDAO (Don't use *)
Class: StringBuffer, InputStream
Method: getAccountId(), getUrlString()
Constants: All upper-case with underscore MAX_INTEGER
File Naming Convention (Pay attention to -- and _ )
Java/JSP File: small_fox.jsp/java
XML: use - instead of _ for all xml elements
1) ClassName VersionInfo History Copyright
2) Package
3) Import ( J2SE -> J2EE/J2ME -> Third Party Libs -> Self Common -> Self Specific)
4) Class Documentation for Javadoc
5) Class / Interface Statement
6) Class Implementation Detail Implementation
7) Static Variable (Public->Protected->Private)
8) Instance Variable (Public->Protected->Private)
9) Constructors (No-arg constructor first)
10) Methods (Grouped by accessibility or functionality)
Naming Convention
Package: All lower-case com.scs.common.reuse.searchDAO (Don't use *)
Class: StringBuffer, InputStream
Method: getAccountId(), getUrlString()
Constants: All upper-case with underscore MAX_INTEGER
File Naming Convention (Pay attention to -- and _ )
Java/JSP File: small_fox.jsp/java
XML: use - instead of _ for all xml elements
相关文章推荐
- java基础总结——命名规则+path+基本数据类型
- 基本Java命名规则
- JAVA命名规则与基本数据类型
- java命名基本规则
- Java中命名规则及基本数据类型的长度、表示范围
- Java中命名规则及基本数据类型的长度、表示范围
- java中包命名常见规则
- 写java程序的30个基本规则
- Java程序的组织形式和命名规则
- javaWeb javaEE 命名规则
- Java命名规则详细总结
- Java变量命名规则
- java的一些命名规则
- java包、类、方法、属性、常量命名规则
- JAVA的命名规则
- Java基础-----命名规则
- Java文件名及其他命名规则
- mybatis开启字段自动映射为java驼峰命名规则
- java的一些命名规则
- java中包的命名规则