What is static method? Why need to define as static?
Static Method is a class method. It can be accessed by class name not by object. It gets initialized on loading itself. It allocates common memory for all.
we have to define a method as static because it can access only static variables .