There are two initial processes for the VM type variables. The first step is in the preparation phase, assign the system initial values (for example, the int type value 0 ), the second step is to assign the initial value defined by the programmer in the initialization phase. Therefore, the program will give the default value even if the class variable is not given the initial value. The Code is as follows: [java] public class MTest {int B; public void test () {System. out. println (B) ;}} [java] [java] But for local variables, local variables do not exist in the preparation stage of class variables. Therefore, if you do not assign values to local variables, a compilation error is reported. The code is as follows: [java] <pre name = "code" class = "java"> public class MucheTest {int B; public void test () {int; system. out. println (a) ;}}</pre> <br> the statement printed as a is incorrect, variable has no initial value <pre> </pre> <p> </p> <pre> </pre> <br> <p> </p>