...
It is insufficient to compare with Integer.MAX_VALUE - 1
when the loop increment is greater than 1. To be compliant, ensure that the comparison is carried out with (Integer.MAX_VALUE
minus the counterstep's value).
Code Block | ||
---|---|---|
| ||
for (i = 1; i <= Integer.MAX_VALUE - 2; i += 2) { // ... } |
...