There are three variables in Java, namely, class variables, member variables and local variables. They were stored in the method area the JVM heap memory and stack memory.
/ **
* @author win
* / public class the Variables { / ** * Class variables * / Private static int A; / ** * member variables * / Private int B; / ** * local variables * @param C * / public void Test ( int C ) { int D; } }