Vidyalelo
Java Programming · Q24

Overriding and Overloading

Programming · Java Programming · question 24

Q24

In Java, can a method be overloaded by changing only the return type?

A.
Yes, it is allowed
B.
Yes, but only for static methods
C.
No, methods with the same name must have the same return type
D.
No, the return type cannot be changed
Answer

Answer: Option D

Solution

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