Vidyalelo
Java Programming · Q28

Overriding and Overloading

Programming · Java Programming · question 28

Q28

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

A.
Yes, but only for static methods
B.
No, it is not allowed
Answer
C.
No, the methods must have different parameter types
D.
None of These

Answer: Option B

Solution

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