1.

What is the process of defining two or more methods within same class that have same name but different parameters declaration?(a) method overloading(b) method overriding(c) method hiding(d) none of the mentioned

Answer» The correct choice is (a) method overloading

For explanation I would say: Two or more methods can have same name as long as their parameters declaration is different, the methods are said to be overloaded and process is called method overloading. Method overloading is a way by which Java implements polymorphism.


Discussion

No Comment Found

Related InterviewSolutions