Local variables do not get initialized to a default value. That only happens with class and instance member variables. You have to explicitly initialize local variables before you can use them in a boolean expression.
Practice only makes habit, only perfect practice makes perfect.
Practice mindfully by doing the right things and doing things right.— Junilu