Overloading - Object oriented programming (MCQ) questions

Here, you can read Overloading multiple choice questions and answers with explanation.

1)   Overloaded methods in java
- Published on 19 Oct 15

a. Compiler uses method signature to determine which method to invoke. They may have different functionality
b. They are not available in fundamental classes
c. They have the same name and signature
Answer  Explanation 

ANSWER: Compiler uses method signature to determine which method to invoke. They may have different functionality

Explanation:
To invoke the overloaded methods the compiler compares the method signature in the method invocation against the method signature in the class. Overloaded methods are widely used in the fundamental pre-written class libraries in java. Java class can have several methods with same name but different arguments so that the signature is different.


1