Cannot reference this before supertype constructor has been called

前端 未结 4 1491
萌比男神i
萌比男神i 2021-01-16 16:17

I\'m attempting to implement a circular queue class in Java. And in doing so I had to created a node class to group together elements and pointers to the next node. Being ci

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-16 16:54

    The compile error is

    Cannot refer to 'this' nor 'super' while explicitly invoking a constructor
    

    Basically, you cannot use "this" from inside "this(...)"

提交回复
热议问题