This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where do local variables in static methods live?
 
It's not a secret anymore!