TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Basic103Checked automatically with code checker

Synopsis:Don't modify control variables within a for block
Language:Java
Severity Level:2
Category:Basic


Description:
Reassigning loop variables can lead to hard-to-find bugs. Prevent or limit how these variables can be changed.
for (int i = 0; i < 1; i++) {
    i++; //violation
}