File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "static variable" Watch "static variable" New topic

static variable

sudha siva
Ranch Hand

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

Joined: Aug 26, 2000
Posts: 1242
well.. local var is local var. It will be gone when the method
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:
subject: static variable
It's not a secret anymore!