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

Rule:  Basic7Checked automatically with code checker

Synopsis:Avoid modifying an outer loop incrementer in an inner loop for update expression
Language:Java
Severity Level:1
Category:Basic


Description:
Avoid jumbled loop incrementers - it's usually a mistake, and it's confusing even if it's what's intended.
public class JumbledIncrementerRule1 {
  public void foo() {
   for (int i = 0; i < 10; i++) {
    for (int k = 0; k < 20; i++) {
     System.out.println("Hello");
    }
   }
  }
 }