File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes sierra + bates scjp 5 - page 175 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "sierra + bates scjp 5 - page 175" Watch "sierra + bates scjp 5 - page 175" New topic
Author

sierra + bates scjp 5 - page 175

Alan Heebson
Greenhorn

Joined: Nov 05, 2007
Posts: 5
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

Joined: Oct 20, 2007
Posts: 513
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.


SCJP 5.0
Alan Heebson
Greenhorn

Joined: Nov 05, 2007
Posts: 5
Thanks Kelvin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sierra + bates scjp 5 - page 175
 
Similar Threads
WA #1.....word association
Picture need...
stack or heap?
Tricky Question
generating XML using servlets/jsp