Java - Inheritance
Which of the following is the correct syntax to override a method in Java?
class Parent {
void show() { System.out.println("Parent"); }
}
class Child extends Parent {
?
}Which of the following is the correct syntax to override a method in Java?
class Parent {
void show() { System.out.println("Parent"); }
}
class Child extends Parent {
?
}15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions