How can an anonymous class have arguments?

后端 未结 4 1651
庸人自扰
庸人自扰 2021-01-22 05:42

I\'m not a java guy but I\'ve inherited some code I need to patch up. I pulled the source into netbeans and I\'m getting the error: Anonymous class implements interface; cannot

4条回答
  •  爱一瞬间的悲伤
    2021-01-22 06:06

    An anonymous class of the form new -interface- implicitly extends Object. You have to use one of the constructors for Object. There is only one - the no-args constructor.

提交回复
热议问题