posts - 23,comments - 66,trackbacks - 0
          Code Conventions for the JavaTM Programming Language

          Revised April 20, 1999



          1 Introduction
          1.1 Why Have Code Conventions
          1.2 Acknowledgments

          2 File Names
          2.1 File Suffixes
          2.2 Common File Names

          3 File Organization
          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
          7.1 Simple Statements
          7.2 Compound Statements
          7.3 return Statements
          7.4 if, if-else, if else-if else Statements
          7.5 for Statements
          7.6 while Statements
          7.7 do-while Statements
          7.8 switch Statements
          7.9 try-catch 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
          11.1 Java Source File Example
          posted on 2006-07-16 15:29 rd2pm 閱讀(419) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          主站蜘蛛池模板: 晋江市| 长海县| 舞钢市| 崇阳县| 南京市| 瑞昌市| 保山市| 广西| 沙河市| 蛟河市| 闻喜县| 曲沃县| 巴林左旗| 连南| 德江县| 宁津县| 哈尔滨市| 祥云县| 都昌县| 连南| 来宾市| 齐齐哈尔市| 抚顺市| 札达县| 大洼县| 易门县| 湘西| 朝阳市| 如皋市| 杭州市| 老河口市| 遵义县| 太白县| 石屏县| 马公市| 宁强县| 德阳市| 诸城市| 孙吴县| 临漳县| 永平县|