Using Static Functions
Static method are also called class method because these methods can be called without creating an object of that class. A method is made static by using the keyword, ’static’ in the method declaration. We can declare both functions and variables as static. The most common example of a static function is the main().
As you seen that generally, the main() method of java program is declared with the keyword, ‘static’, so that main() can be executed by the interpreter without creating an object from the class.