A static method belongs to the class rather than the object of a class . A static method can be invoked without the need for creating an instance of a class. A static method can access static data member and can change the value of it.
A static method belongs to the class rather than the object of a class . A static method can be invoked without the need for creating an instance of a class. A static method can access static data member and can change the value of it.