Hello Everyone, I am working on a java project and getting some errors which I mentioned below. I have this class, Person:
public class Person{
String firstname;
String lastname;
public Person(String fname, String lname){
}
public String toString(){
}
}
And this subclass, Student:
public class Student extends Person{
Student(){
super();
}
int studentID;
int level;
public Student(String fName, String lName, int gLevel){
}
public int getLevel(){
}
public String toString(){
}
}
When I compile this code on Interviewbit, I get the error:
cannot find symbol
symbol : constructor Person()
location: class Person
I am confused what the problem is. It’s my understanding that the use of the super() constructor should resolve this problem, and that it’s not even necessary in the code but I’m continuing to get this error.