Java Static Variables :

In Java static is a keyword. We can use the static keyword in front of variables, methods, blocks and classes.

Static variables are consider to be class level variables, because the values of the static variables are at class level, and not bound to be a specific instance of that class, where as in instance variables the value of a variable is bound to be with a specific instance.

Where do we use.?

If the value of a variable is not varied from one object to another object, then it is never recommended to declare that variable as reference variable that should be declared as static.

Static variables are allocated memory in static pool, and it is happening while loading the class itself.

Since the static variable are class level variables, we don’t need any instance to access these variables. We can directly access the static variables by using the class name itself.

Hi
Folks,
you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,