public class LecturerInfo extends StaffInfo {
private float salary;
public LecturerInfo()
{
this();
this.Name = null;
this.Addr
the code below is recursive. Since this()
will call no arg constructor of current class that means LectureInfo()
again.
public LecturerInfo()
{
this(); //here it translates to LectureInfo()
this.Name = null;
this.Address = null;
this.salary=(float) 0.0;
}
if you modify the fist constructor to this:
public LecturerInfo()
{
this(null, null, (float)0.0);
}
this will be recursive.
by calling this()
you are calling your own constructor. By observing your code it seems you were supposed to call super()
instead of this();