Code Style

Method Order:

The following were obtained from SO.

  1. Constructors
  2. Static methods next, if there is a main method, always before other static methods
  3. Non-Static methods next, usually in order of the significance of the method followed by any methods that it calls. This means that public methods that call other class methods appear towards the top and private methods that call no other methods usually end up towards the bottom
  4. toString, equals and hashcode etc.
  5. getters and setters have a special place reserved right at the bottom of the class

Formatting using JIndent

  1. cross-IDE support.
  2. potential for running as a console tool on a CI server.