File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Where do local variables in static methods live? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Where do local variables in static methods live?" Watch "Where do local variables in static methods live?" New topic
Author

Where do local variables in static methods live?

Dennis Diment
Greenhorn

Joined: Dec 31, 2003
Posts: 7
Static methods and static variables are loaded when the class is loaded. This means both go on the heap. Right?

How about local variables in static methods? Is a stack frame generated for static methods? Why else do they not get default values? (I'm not a CS major )

Dennis
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Intermediate forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
jQuery in Action, 2nd edition
 
subject: Where do local variables in static methods live?