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

Rule:  UnusedCode2Checked automatically with code checker

Synopsis:Avoid unused local variables
Language:Java
Severity Level:4
Category:UnusedCode


Description:
Detects when a local variable is declared and/or assigned, but not used.
public class Foo {
 public void doSomething() {
  int i = 5; // Unused
 }
}