...
| Code Block | ||
|---|---|---|
| ||
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 | ||
|---|---|---|
| ||
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.
...