Memory allocation and life of variables
<p>My question or rather questions are as follows:</p>

<p>1)Where does the static variable reside . Some articles say they reside on the heap and some some say in the perm gen area with the class definition as they are class attributes. I understand the second option might be correct because it is a class attribute.<br>
2)Where does the final variable reside and what is its life if:
   a) Its an instance variable of type primitive
   b) Its a local variable of a method of type primitive
   c) Its an instance variable of type reference
   b) Its a local variable of a method of type reference<br>
3)Where are the reference local variables stored if they are local.<br>
4)In case of arrays is there any difference in memory allocation as in they are instance variable or local thread variable.  </p>

<p>Thanks</p>
