Why this code runs normal
static boolean bool;
public static void main() {
System.out.println(bool);
}
While here
public static void main() {
boolean bool;
System.out.println(bool);
}
I have error: Variable 'bool' might not have been initialized
Aren't both of them have default value false
?