Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 5

...

  1. File content must be kept within 180 columns
  2. Continuation of lines should be obvious:
    Code Block
    totalSum = a + b + c +
        d + e;
    
  3. Must indent with space not tabs. Indentation = 4 spaces
  4. Line endings should be LR (Mac / Linux format)
  5. White space:
    1. - Operators should be surrounded by a space character.
    2. - Java reserved words should be followed by a white space.
    3. - Commas should be followed by a white space.
    4. - Colons should be surrounded by white space.
    5. - Semicolons in for statements should be followed by a space character.
  6. Block layout should be as illustrated below . Class, Interface and method blocks should also use this layout.
    Code Block
    while (!done) {
        doSomething();
        done = moreToDo();
    }
    
  7. If-else clauses must use the following layout:
    Code Block
    if (condition) {anchor:IDE-settings-file}anchor:IDE-settings-file}tements
        statements;
    } else {
        statements;
    }
    
  8. The try-catch block follows the if-else example above

...