Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed exception

...

Code Block
bgColor#ccccFF
public class Example {
  private T a;
  private T b;
  private T[] c;
  private T d;

  public Example(T in){
    a = in;
    b = in;
    c = (T[]) new Object[10];
    d = in;
  }
}

Exceptions

DCL04-01: Trivial declarations for loop counters, for example, can reasonably be included within a for statement:

Code Block
bgColor#ccccff

for (int i = 0; i < mx; ++i ) {
  /* ... */
}

Risk Assessment

Failing to declare no more than one variable per declaration can affect code readability and cause misinterpretations.

...