How does Java\'s reference variable stored? Is that work similar to C pointer?
what I mean by reference variable is myDog in this code
Dog myDog = ne
All the references to s1, s2, ob1, obj2 and obj3 will be stored in the Stack.
The objects data, will be stored in the Heap (and for String for example in can be stored in a special constant pool).