Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by NavBot

...

Code Block
bgColor#FFcccc
public class Example&lt;T&gt;Example<T> {
  private T a, b, c[], d;

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

...

Code Block
// Correct functional implementation
public String toString(){
  String s = a.toString() + b.toString();
  for(int i = 0; i &lt;< c.length; i++){
    s += c[i].toString();
  }
  s += d.toString();
  return s;
}

...

Code Block
bgColor#ccccff
for (int i = 0; i &lt;< mx; ++i ) {
  /* ... */
}

Risk Assessment

...

Wiki Markup
\[[JLS 05|AA. Java References#JLS 05]\] Section 6.1, &quot;Declarations&quot;"Declarations", Section 4.3.2, &quot;"The class Object&quot;"
\[[ESA 05|AA. Java References#ESA 05]\] Rule 9: Put single variable definitions in separate lines.
\[[Conventions 09|AA. Java References#Conventions 09]\] 6.1 Number Per Line

...

DCL03-J. Use meaningful symbolic constants to represent literal values in program logic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      03. Declarations and Initialization (DCL)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      DCL05-J. Properly encode relationships in constant definitions