- 博客(2)
- 收藏
- 关注
原创 【Error Log】Multiple markers at this line - Cannot refer to an instance field x while explicitly inv
Multiple markers at this line- Cannot refer to an instance field x while explicitly invoking a constructor- Cannot refer to an instance field y while explicitly invoking a constructor这行有多个标记-在显式调用构造函数时无法引用实例字段x-在显式调用构造函数时无法引用实例字段y错误代码:public abstra
2020-07-03 01:03:21 270 1
原创 【Error Log】The abstract method fire in type Tank1 can only be defined by an abstract class类型Tank1中的抽
The abstract method fire in type Tank1 can only be defined by an abstract class.类型Tank1中的抽象方法fire只能由抽象类定义。错误代码:public class Tank1 { public abstract void fire();}父类的方法加上abstract,代表将可变部分的逻辑,交由子类实现。抽象方法的声明格式为:abstract void fun();抽象方法必须用abstract关键字进行
2020-07-03 00:39:26 429
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人