Recursive Constructor Invocation

前端 未结 3 1684
执笔经年
执笔经年 2020-12-11 10:16
public class LecturerInfo extends StaffInfo {

    private float salary;

    public LecturerInfo()
    {
        this();
        this.Name = null;
        this.Addr         


        
3条回答
  •  悲&欢浪女
    2020-12-11 11:08

    by calling this() you are calling your own constructor. By observing your code it seems you were supposed to call super() instead of this();

提交回复
热议问题