Skip to main content

Java: what is Static Member?

what is static member? what are the types of static variable? to know that read the following care fully and completely.

STATIC MEMBERS.
Static member can be of static variable and static member. 

STATIC VARIABLE.
Static variable are global to a class and belong to the entire set of object that class creates.

Only one memory location is created for each class variable. these are basically a static data members of a class.

They take common value for all the objects. It is also known as class variable.

STATIC METHODS.
Static methods are the the method which behave same for the objects of a class.

object are not needed to call static methods.

object after insignificant with static methods.

Nesting methods.
A method can be called by using only its name by using only its name by another method of the same class. This is known as nesting of method.

Java method permits nesting of methods freely.

Comments