Hi all,
Suppose say i have a class something like this,
Class A
{ int a = 10;}
//After creating an instance from this class
Class B
{
A a = new A();//Where exactly object will be stored and integer member.}
Thanks
Vishwanath
"A a = new A();//Where exactly object will be stored and integer member.}"
the Object will be stored in an area of memory called Heap
and all the value type variables(like integer) store in an area of memory called STACK
thanks
Hi,
And how abt the linking process takes place between the object and the integer member.. I would like to know internally?
Thanks
Vishwanath
visit the following link you will get clear:
http://www.albahari.com/value%20vs%20reference%20types.html
thanks
0 comments:
Post a Comment