File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sierra + bates scjp 5 - page 175

 
Alan Heebson
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fig 3-1 on page 175 shows a diagram of the stack and heap for the program written on the previous page.

I have a query about "String[] args" argument used in the main method. Should the 'args' variable be shown as a local variable on the stack?

'args' isnt mentioned at all in Fig 3-1, can anyone tell me if it is an oversight in the book or alternativly point out where I am going wrong!

Thanks
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're absolutely correct. The args variable does reside on the stack (but not the string array it points to), so strictly speaking the diagram should have reflected that.
 
Alan Heebson
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kelvin
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic