eclipse main函数报错
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at hello.lzp.main(lzp.java:5)eclipse无法使用main语言 不知道是怎么回事 求解答
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at hello.lzp.main(lzp.java:5)eclipse无法使用main语言 不知道是怎么回事 求解答
2016-05-20
你的主函数名应该和所建的不一致。下面是我编的代码
public class App10_9 {
public static void main(String[] args) {
int score=40;
int count=0;
System.out.println("加分前的分数"+score);
while(score<60)
{
score++;
count++;
}
System.out.println("加分后的成绩是"+score);
System.out.println("加分次数为"+count);
}
}运行结果如下: 加分前的分数40 加分后的成绩是60 加分次数为20
举报