Is method overloading is possible by only changing the return type of parameters? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is method overloading is possible by only changing the return type of parameters?

9th Apr 2019, 2:59 AM
Avinash Maurya
Avinash Maurya - avatar
2 Answers
+ 2
No,also by changing number and type of parameters
9th Apr 2019, 3:28 AM
Saksham Jain
Saksham Jain - avatar
+ 1
Method overloading can't be performed by changing return type of the method only. Return type can be same or different in method overloading. But you must have to change the parameters.
9th Apr 2019, 4:00 AM
Шащи Ранжан
Шащи Ранжан - avatar