0
I want to do overloading. I make two method same name return different type. I have errors. How can i do it? Thank you.
Overloading (method). https://code.sololearn.com/c8VOGuBphg9S/?ref=app
2 Réponses
+ 1
They may not return different types, this is essential part of the method signature. Methods can be overloaded with different parameterization (type and number of parameters may differ).
0
Overloading has to have different number of parameters or different types of parameters I don't think just changing the return type helps