Google Java style
https://google.github.io/styleguide/javaguide.html
- Source files are encoded in UTF-8.
- Tab characters are not used for indentation; use two spaces
- A source file consists of, in order:
- License or copyright information, if present
- Package statement
- Import statements
no wildcard imports
- Exactly one top-level class
never split overloads classes
always use braces for if,else,for,do and while
style of braces
1 |
return () -> { |
line-wrapping normally at 100, but there are exceptions; wrapped lines indent 4+ spaces
- Exactly one blank line separates each section that is present
近期评论