【发布时间】:2014-11-12 17:02:49
【问题描述】:
这是代码:
package main;
import java.awt.*;
import acm.graphics.*;
import acm.program.*;
public class AjorBandi extends GraphicsProgram{
public void run(){
private static final BRICK_TOOL=30 ;
private static final BRICK_ARZ = 10;
int x,y;
x=0;
y=100;
for(int ii=0;ii<14;ii++){
for(int i= 0;i<14;i++){
Grect rect = new Grect(x,y,BRICK_TOOL,BRICK_ARZ);
add(rect);
x+=30;
i-=1;
}
y+=10;
x+=15;
}
}
}
这是来自 eclipse 的 Grect 错误消息:
Multiple markers at this line
- Grect cannot be resolved to a
type
- Grect cannot be resolved to a
type
这是private static 错误信息:
Multiple markers at this line
- Line breakpoint:AjorBandi [line: 10] - run()
- Syntax error on token "final", float expected
- Illegal modifier for parameter BRICK_TOOL; only final is
permitted
我的这个 i eclipse IDE 出现编译错误。 这2个错误是什么问题?
【问题讨论】:
-
Java 区分大小写。这是GRect