Can we overload a function with the help of its return type? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we overload a function with the help of its return type?

27th Dec 2019, 6:46 PM
Siddharth Darnal
Siddharth Darnal - avatar
3 Answers
+ 1
The return type is not part of the check for uniqueness. The parameter combination must be unique.
27th Dec 2019, 8:38 PM
John Wells
John Wells - avatar
0
Type or number of parameters has to be changed as well.
27th Dec 2019, 6:52 PM
Avinesh
Avinesh - avatar
27th Dec 2019, 10:54 PM
rodwynnejones
rodwynnejones - avatar