哪里有问题列。。
import java.util.Arrays;
public class HelloWorld {
//完成 main 方法
public static void main(String[] args) {
int [] scores={89,-23,64,91,119,52,73};
HelloWorld hello=new HelloWorld();
hello.nima(scores);
System.out.println("考试成绩前三名为:");
}
//定义方法完成成绩排序并输出前三名的功能
public int nima(int [] scores){
for(i=scores.length-1;i>=0;i--){
if(scores[i]>100||scores[i]<0){
continue;
}
int j=0;
j++;
if(j<=3){
System.out.println(scores[i]);
}
}
}
}
错误:
error: cannot find symbol
for(i=scores.length-1;i>=0;i--){
^
symbol: variable i
location: class HelloWorld
error: cannot find symbol
for(i=scores.length-1;i>=0;i--){
^
symbol: variable i
location: class HelloWorld
error: cannot find symbol
for(i=scores.length-1;i>=0;i--){
^
symbol: variable i
location: class HelloWorld
error: cannot find symbol
if(scores[i]>100||scores[i]<0){
^
symbol: variable i
location: class HelloWorld
error: cannot find symbol
if(scores[i]>100||scores[i]<0){
^
symbol: variable i
location: class HelloWorld
error: cannot find symbol
System.out.println(scores[i]);
^
symbol: variable i
location: class HelloWorld
6 errors