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://waylau.com/java-code-conventions/ Let's READ!
《Java 编码规范》中文翻译。这个文档包含了 Sun 所遵循以及推荐的标准的规范。它涵盖了文件名,文件组织,压缩,声明,注释,语句,空白,命名规范,编码惯例以及一个代码示例。
- 一个软件的生命周期中,80%的花费用于维护.
- 几乎没有任何一个软件,在其整个生命周期中,均由最初的作者来维护.
- 编码规范可以改善软件的可读性,可以让程序员尽快而彻底地理解新的代码.
文档最后版本由 Sun 公司于1999年4月20日更新,虽然过去十几年,但这个规范至今对编码的规范指导仍然适用,特此翻译。如有勘误欢迎指正。
从目录开始阅读吧
选择下面入口之一:
- https://github.com/waylau/java-code-conventions 的 SUMMARY.md(源码)
- http://waylau.gitbooks.io/java-code-conventions 点击 Read 按钮(同步更新,国内访问速度一般)
- http://waylau.com/java-code-conventions(国内访问速度快,定期更新。最后更新于 2017-8-31)
如有勘误、意见或建议欢迎拍砖 https://github.com/waylau/java-code-conventions/issues
- Blog: waylau.com
- Gmail: waylau521(at)gmail.com
- Weibo: waylau521
- Twitter: waylau521
- Github : waylau