wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "static variable" Watch "static variable" New topic
Author

static variable

sudha siva
Ranch Hand

Joined: Sep 18, 2001
Posts: 30
why local variables should not be static?
Thanks
sudha
Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
well.. local var is local var. It will be gone when the method
return.
Static var...
Any attribute that has the static modifier applies to the entire class as a whole. Its like a global var. You can use it globally.
hope this help.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static variable
 
Similar Threads
Single tone Vs Static
WA #1.....word association
static and non static methods
property file dynamic vs static
static and non static methods