Local variables are not initialized to default values, as in the case of class variables. The same goes for primitives and object reference.
JavaDoc (section 4.12.5. Initial values ββof variables):
A local variable must be explicitly given a value before it is used, by either initialization or assignment, in a way that can be verified using the rules for definite assignment.
source share