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