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

Rule:  Basic100Checked automatically with code checker

Synopsis:Each variable should have an initializer.
Language:Java
Severity Level:3
Category:Basic


Description:

Local variables should be declared at the point they are first used. Nearly every local variable declaration should contain an initializer. If you don't yet have enough information to initialize a variable sensibly, you should postpone the declaration until you do.

Justification:

Failure to initialize a local variable has been identified as a very common source of error. Also, declaring local variables without using them immediately may increase their scope.



Literature References:
Google Android Guidelines