Java the memory is divided into two, one called the stack memory, called heap memory;
1. The memory stack (Stack)
The method used runtime memory, such as main operation method, the method into the execution stack; each method in the stack memory has a separate stack space, after popping method will disappear; store local variables (i.e. variable grade method);
2. heap (Heap)
Storage object or array, storing member variables (object instance-level variables), to create the all new, are stored in the heap memory;