目录
一 命名规范 ....................................................................................................................................2
1 基本的规则 ..........................................................................................................................2
2 常量命名 ..............................................................................................................................2
3 变量命名 ..............................................................................................................................2
4 方法命名 ...............................................................................................................................3
5 类和接口的命名 ..................................................................................................................4
6 包的命名 ..............................................................................................................................4
二、代码格式 ..................................................................................................................................4
1 注释类型 ..............................................................................................................................4
2 注释内容 ..............................................................................................................................4
3 注释格式 ..............................................................................................................................6
4 注释规范 ..............................................................................................................................7
三 文件组织 ....................................................................................................................................8
1 书写顺序和规范 ..................................................................................................................8
四 代码优化 ....................................................................................................................................9
1 代码大小 ..............................................................................................................................9
2 方法 ......................................................................................................................................9
3 属性和变量 ..........................................................................................................................9
4 代码格式 ............................................................................................................................10
5 字符串处理 ........................................................................................................................11
6 循环 ....................................................................................................................................11
7 switch 语句..........................................................................................................................11
8 异常 ....................................................................................................................................12
9 日志和调试信息 ................................................................................................................12
10 java.util 包的使用注意......................................................................................................13