It's not a secret anymore!
The moose likes Beginning Java and the fly likes Static Varaibles Explination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Static Varaibles Explination" Watch "Static Varaibles Explination" New topic

Static Varaibles Explination

Osgar ali

Joined: Jan 24, 2009
Posts: 22

I know what static variable, When it comes to it application can someone explain me the circumstances where I can use static variables.
and circumstances where I don't want to use static variables. Any Example will really help.

Dean Pullen
Ranch Hand

Joined: May 30, 2003
Posts: 58
Tbh it's pretty easy to find information on static usage on the web, via Google.

And the Sun Java tutorial:

Static members are class members, not class instance members.
So there's one 'instance' of each static member for any number of class instances.

I think that tutorial page above does a pretty good job of explaining it, and even has a very basic example.
Osgar ali

Joined: Jan 24, 2009
Posts: 22
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Static Varaibles Explination
It's not a secret anymore!