1.

When Overloading does not occur?(a) More than one method with same name but different method signature and different number or type of parameters(b) More than one method with same name, same signature but different number of signature(c) More than one method with same name, same signature, same number of parameters but different type(d) More than one method with same name, same number of parameters and type but different signatureThis question was addressed to me during an internship interview.Enquiry is from Concepts of OOPs topic in division Java Environment & OOPS Concepts of Java

Answer»

Right option is (d) More than ONE METHOD with same name, same number of parameters and type but DIFFERENT signature

To explain I would say: OVERLOADING occurs when more than one method with same name but different constructor and also when same signature but different number of parameters and/or parameter type.



Discussion

No Comment Found

Related InterviewSolutions