8-1编程老是报错
import java.util.Arrays;
public class HelloWorld {
//完成 main 方法
public static void main(String[] args) {
int scores[] = {89,-23,64,91,119,52,73};
System.out.println("前三名成绩为:");
HelloWorld hello = new HelloWorld();
hello.topthree(scores);
}
//定义方法完成成绩排序并输出前三名的功能
public void topthree(int socres[]){
Arrays.sort(scores);
int count = 0;
for(int i = scores.length-1;i>=0;i--){
if(scores[i]>100 || socres[i]<0){
continue;
}
count++;
if(count>3) {break;}
System.out.println(scores[i]);
}
}
}
我这哪里错了啊