1.

What is the process of defining more than one method in a class differentiated by method signature?(a) Function overriding(b) Function overloading(c) Function doubling(d) None of the mentionedI had been asked this question by my college director while I was bunking the class.My question is based upon Introduction To Methods in section Classes and Methods of Java

Answer»

Correct choice is (B) Function overloading

Easy explanation: Function overloading is a process of defining more than ONE method in a class with same name differentiated by function signature i:e return type or parameters type and number. Example –INT volume(int LENGTH, int width) & int volume(int length , int width , int height) can be used to CALCULATE volume.



Discussion

No Comment Found

Related InterviewSolutions