怎么成绩全是0
import java.util.*;
public class HelloWorld {
//完成 main 方法
public static void main(String[] args) {
int[] scores = {89,-23,64,91,119,52,73};
TopE(scores);
}
//定义方法完成成绩排序并输出前三名的功能
public static void TopE(int[] in) {
int count = 0;
int[] ab = new int[3];
int j = 0;
try{
for(int i = in.length; i >= 0; i--) {
if(in[i]>0 && in[i]<100) {
ab[j++] = in[i];
count++;
if(count > 3)
break;
}else {continue;}
}
}catch (Exception e) {}
System.out.println("考试成绩的前三名为:");
Arrays.sort(ab);
System.out.println(Arrays.toString(ab));
}
}