Tag: java static variables

Static Java

May 7, 2013 · 1 min read
"**static**" is a keyword used as an access modifier. Novices confuse between [access specifiers and access modifiers](http://way2java.com/oops-concepts/access-specifiers-access-modifiers/). Access specifiers are **public**, **protected** etc. and access modifiers are **static**, **final**, **abstract** etc. As their names indicate, **access specifier specifies the access** to the class by other classes and **[access modifier modifies the access](http://way2java.com/oops-concepts/access-modifiers-%e2%80%93-meanings/)**. For example, generally to call a variable from the main(), it requires an object. If the instance variable is **static**, it can be called without the need of an object. One more example, a variable can be reassigned, but a **final** variable cannot be reassigned.