title: Difference between class area and heap
body: <p>The JVM allocates these areas in memory:
  Class(Method) Area, Heap, Stack, Program counter Register, Native method stack.</p>
  
  <p>I know that heap is used to store objects and stack is used to store local variables and partial results.
  According to definition,
  Class(Method) Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods. But I really don't understand the difference.</p>
  
  <p>Can anyone please explain the difference between Class area and Heap?</p>