• Post Reply Bookmark Topic Watch Topic
  • New Topic

may be a very simple ques...but plz clear this  RSS feed

 
Navu Kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
let me consider an example
when v say Button b= new Button()


v all know that 4 things take place
1)a new object Button is created
2)that is created on the heap
3)Button constructor is called
4)reference variable b is holding the reference to obkect buttton

But my question is that where is the Variable b residing is it in the stack or the heap???
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!