title: Memory allocation of members of class
body: <p>I have class as following:</p>
  
  <pre><code>public class A
  {
     int i;
   }
  </code></pre>
  
  <p>When I am creating and object of class as following:</p>
  
  <pre><code> A obj=new A();
  </code></pre>
  
  <p>I can understand the object is allocated in Heap. Now the class got a integer variable. Where the member variable "i" is allocated (in stack or heap)?  </p>