Using Static Functions

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.



CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Sarkari Exam Quiz O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank