Code Conventions for the Java Programming Language 中文翻译《Java 编码规范》

Code Conventions for the Java Programming Language 中文翻译《Java 编码规范》

Chinese translation of the Code Conventions for the Java Programming Language document. This document contains the standard conventions that we at Sun follow and recommend that others follow. It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices and includes a code example.

  • 80% of the lifetime cost of a piece of software goes to maintenance.
  • Hardly any software is maintained for its whole life by the original author.
  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.

The last revision to this document was revised and updated on April 20, 1999 by Sun Microsystems. There is alse a GitBook version of the book: http://waylau.gitbooks.io/java-code-conventions/ or http://www.waylau.com/java-code-conventions/ Let's READ!

《Java 编码规范》中文翻译。这个文档包含了 Sun 所遵循以及推荐的标准的规范。它涵盖了文件名,文件组织,压缩,声明,注释,语句,空白,命名规范,编码惯例以及一个代码示例。

  • 一个软件的生命周期中,80%的花费用于维护.
  • 几乎没有任何一个软件,在其整个生命周期中,均由最初的作者来维护.
  • 编码规范可以改善软件的可读性,可以让程序员尽快而彻底地理解新的代码.

文档最后版本由 Sun 公司于1999年4月20日更新,虽然过去十几年,但这个规范至今对编码的规范指导仍然适用,特此翻译。如有勘误欢迎指正,点此提问。

另外有 GitBook 的版本方便阅读http://waylau.gitbooks.io/java-code-conventions/ 或者 http://www.waylau.com/java-code-conventions/(国内访问速度快)

目录开始阅读吧

Contact: