- Format source code and Organize imports in Eclipse
- Avoid multiple returns (exit points) in methods
- Simplify if-else methods
- Do not create new instances of Boolean, Integer or String
- Name public static final fields in UPPERCASE
- Combine multiple if statements into one
- switch should have default
- Avoid duplicate string literals, instead create a constant
http://www.dzone.com/links/r/8_common_code_violations_in_java.html
No comments:
Post a Comment