Java - Inheritance
Identify the error in this code:
class Parent {
void show() {
System.out.println("Parent show");
}
}
class Child extends Parent {
void show() {
System.out.println("Child show");
}
void show(int x) {
System.out.println("Child show with " + x);
}
}
public class Test {
public static void main(String[] args) {
Parent p = new Child();
p.show(5);
}
}