+ 7
Variables are only initialized by default if they are either instance variables or static.
Observe the following:
public class AClass{
boolean a;
void assumeCalled(){
boolean b;
System.out.print(a); // ok, false
System.out.print(b); // illegal
}
}
There's a good explanation here on c# (which would be the same reasons as java)
http://stackoverflow.com/questions/1542824/initialization-of-instance-fields-vs-local-variables/1542851#1542851
Now that I think of it, I wonder how many challenge questions ignore the illegal rule. đ