What do you mean by static methods?

By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then we can call f() function as A.f(). There is no need of creating an object of class A.

Showing Answers 1 - 3 of 3 Answers

Aravind

  • Dec 13th, 2011
 

Static method are methods that dont need any objects to execute. They can be called using the class name in which they are defined) rather than object name. if a method, variable or class is declared as static they are executed even b4 the object of that class is created. so we dont need any object 4 instantiating static methods & static variables.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions