class A
class A {
int a;
int c;
A (int a, int c) {
this.a = a;
this.c = c;
}
}
class B
class B extends A{
public static void main (String [] args) {
A obj = new A (5, 6);
}
}
When I compile the code It shows me this error
B.java:1: error: constructor A in class A cannot be applied to given types;
class B extends A{
^
required: int,int
found: no arguments
reason: actual and formal argument lists differ in length
1 error
When this error appears exactly? And when inheritance the class Is the constructor must be the same type of super class?