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
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply 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]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Where do local variables in static methods live?
 
Similar Threads
Do static variables, methods impose a penalty
static variable inside static function
Synchronized
Automatic variables
variable scope question/confusion