I don\'t have much idea on Java.
I was going through few links and found blog says \"Java Primitives stored on stack\", which I feel it depends on instance variable
Object are stored in the Heap.
The object reference stored in the stack.
Static variable stored in the method area.
Example
abc obj=new abc();
abc object save in the heap and the object reference is stored in the stack.
static int i=10;
i variable stored in the method area.