Vidyalelo
Java Programming · Q17

Overriding and Overloading

Programming · Java Programming · question 17

Q17

In method overloading, can methods have the same name and the same parameter types if their return types are different?

A.
No, the method names must be different
B.
Yes, it is allowed
C.
No, it is not allowed
Answer
D.
Yes, as long as the access modifiers are different

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board