Vidyalelo
Java Programming · Q19

Overriding and Overloading

Programming · Java Programming · question 19

Q19

Can a method be both overloaded and overridden in the same class in Java?

A.
Yes, as long as the method names are the same
Answer
B.
Yes, as long as the access modifiers are the same
C.
No, it is not allowed
D.
No, method overloading and overriding are mutually exclusive

Answer: Option A

Solution

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