Two functions with different return type in one class is valid?
Answers
Answered by
2
Answer:
Having two or more methods named the same in the same class is called overloading. ... Two methods may share the same name, provided the number of parameters are different, or if they both have the same parameters, then there is at least one position, i where the parameter types differ.
Answered by
6
Having two or more methods named the same in the same class is called overloading. ... Two methods may share the same name, provided the number of parameters are different, or if they both have the same parameters, then there is at least one position, i where the parameter types differ.
Similar questions