Total Pageviews

2012/09/17

8 Common Code Violations in Java



  1. Format source code and Organize imports in Eclipse
  2. Avoid multiple returns (exit points) in methods
  3. Simplify if-else methods
  4. Do not create new instances of Boolean, Integer or String
  5. Name public static final fields in UPPERCASE
  6. Combine multiple if statements into one
  7. switch should have default
  8. Avoid duplicate string literals, instead create a constant

http://www.dzone.com/links/r/8_common_code_violations_in_java.html

No comments: