Can methods be overloaded based on the return types ?

Can methods be overloaded based on the return types ?

A method cannot be overloaded on the bases of return types because the compiler will check only the method signature( name of the method and the arguments).

So a method cannot be overloaded on the bases of return types.


By:Sumit Tripathi
Date:2020-05-15 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher