xiqiaowen 2015-11-14 02:22 采纳率: 0%
浏览 1573

JAVA使用EPLICSE编译时提示出错,求解

源代码:
package com.tarena.shoot;
import java.util.Random;
//Airplane----敌机既是飞行物,
public class Airplane extends FlyingObject implements Enemy{
private int speed = 2;//敌机走步的步数
public Airplane(){
image = ShootGame.airplane;
width = image.getWidth();
height = image.getHeight();
Random rand = new Random();
x = rand.nextInt(ShootGame.WIDTH - this.width);
y = -this.height; //y:负的敌机的高
}

//重写 getScore();
public int getScore(){
return 5;
}

public void step(){
y += speed;
}
public boolean outOfBounds(){
return this.y > ShootGame.HEIGHT; //敌机的y坐标大于窗口的高

}
}

提示出错:
FlyingObject 无法解析为类型
还有很多类似的出错,这是其中一个

  • 写回答

2条回答

  • W酱 2015-11-14 04:02
    关注

    FlyingObject是自己写的类吗,没有import进来

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog