求大神指点代码错误
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(); //错误
System.out.println(Arrays.toString(hello.getHighestMarks(scores)));
}
//定义方法完成成绩排序并输出前三名功能
public int[] getHighestMarks(int[] scores) {
int count = 0;
int[] highestThreeScores = new int[3];
Arrays.sort(scores);
while(count<3) {
for(int i=scores.length-1;i>=0;i--) {
if(scores[i]<0||scores[i]>100) //错误
continue;
highestThreeScores [count] = scores[i];
count++;
}
}
return highestThreeScores;
}
}