Java语言编码规范【Sun官方标准】
2009-07-20 19:53 hyddd 阅读(2462) 评论(0) 编辑 收藏 举报原文:Code Conventions for the Java Pogramming Language
译文:Java语言编码规范 @Author:晨光(Morning)
Code Conventions for the Java Programming Language
2 File Names
2.1 File Suffixes
- 3.1 Java Source Files
- 3.1.1 Beginning Comments
- 3.1.2 Package and Import Statements
- 3.1.3 Class and Interface Declarations
4 Indentation
- 4.1 Line Length
- 4.2 Wrapping Lines
5 Comments
- 5.1 Implementation Comment Formats
- 5.1.1 Block Comments
- 5.1.2 Single-Line Comments
- 5.1.3 Trailing Comments
- 5.1.4 End-Of-Line Comments
- 5.2 Documentation Comments
6 Declarations
- 6.1 Number Per Line
- 6.2 Initialization
- 6.3 Placement
- 6.4 Class and Interface Declarations
7 Statements
8 White Space
- 8.1 Blank Lines
- 8.2 Blank Spaces
9 Naming Conventions
10 Programming Practices
- 10.1 Providing Access to Instance and Class Variables
- 10.2 Referring to Class Variables and Methods
- 10.3 Constants
- 10.4 Variable Assignments
- 10.5 Miscellaneous Practices
- 10.5.1 Parentheses
- 10.5.2 Returning Values
- 10.5.3 Expressions before `?' in the Conditional Operator
- 10.5.4 Special Comments
11 Code Examples
作者:hyddd
出处:http://www.cnblogs.com/hyddd/
本文版权归作者所有,欢迎转载,演绎或用于商业目的,但是必须说明本文出处(包含链接)。