Why we are using static?
Static is mainly used to access the class members(variables and method) without any object...all objects of a class ll share the same static members..that means all objects share one copy of staticembers.
The static keyword is mainly used for memory management.
It can be use with-
3. Nested class 4.Block
Methods declared with the keyword static as modifier are called static methods or class methods. They are so called because they affect a class as a whole, not a particular instance of the class. Static methods are always invoked without reference to a particular instance of a class.