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

Rule:  Design5Checked automatically with code checker

Synopsis:Deeply nested if..then statements are hard to read
Language:Java
Severity Level:2
Category:Design


Description:
Deeply nested if..then statements are hard to read.
public class Foo {
 public void bar(int x, int y, int z) {
  if (x>y) {
   if (y>z) {
    if (z==x) {
     // whew, too deep
    }
   }
  }
 }
}