代码格式
无规矩不成方圆,就像你使用Tab键,别人使用空格,这样代码就乱了,格式一点也不规范
一般公司的wiki上或者ide环境配置中都会去规范这些换行、空格等
个人感觉使用Google Java Code Style的规范还是很不错的
这里只说明IDEA中的如何配置
- 下载Google Java Code Style在IntelliJ中的配置文件https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml




** ps ** Ctrl + Alt + L是idea格式化代码的快捷键
网友评论