Computer Science, asked by shallugulati693, 1 year ago

Two functions with different return type in one class is valid?

Answers

Answered by yashgandhi74
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 Anonymous
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