In this article,Static Modifier in Java is explained in detail with examples.
This modifier can be used in four situations
This modifier can be used in four situations
- Data-members.
- Member-Methods.
- Static Block.
- Classes-Related to nested class.
i)Static data-Members.
These data members are those data members,which are common for all the objects of a class.
Static is the keyword used to declare them.