A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Java in General
Where do local variables in static methods live?
Joined: Dec 31, 2003
Jun 14, 2004 07:40:00
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
Joined: Dec 10, 2001
Jun 14, 2004 14:21:00
Moving this to the Intermediate forum...
How To Ask Good Questions
JavaRanch FAQ Wiki
I agree. Here's the link:
subject: Where do local variables in static methods live?
variable scope question/confusion
static variable inside static function
Do static variables, methods impose a penalty
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015