Vidyalelo
Java Programming · Q25

Overriding and Overloading

Programming · Java Programming · question 25

Q25

What is the purpose of method hiding in Java?

A.
Creating a static method with the same name as a superclass method
Answer
B.
Redefining a method with a different return type in a subclass
C.
Making a method private in a subclass
D.
Defining a new method with the same name in a subclass

Answer: Option A

Solution

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