1. When a variable is used as a class member, if it is not initialized, Java will assign a default value for it:
Boolean False
Char '/ u0000' (NULL)
Byte (byte) 0
SHORT (Short) 0
Int 0
Long 0L
Float 0.0F
Double 0.0D
If a variable is defined in a method, Java will not assign a default value to him, you must initialize him, otherwise it will get a prompt for compilation errors;