求助,错在哪里?
package chapter;
import java.util.Arrays;
/**
* Created by 钊哥 on 2017/5/14.
*/
public class nineteen {
public static void main(String args[]){
int []scores= new int[]{89,-23,64,91,119,52,73};
nineteen zhao=new nineteen();
zhao.xin(scores);
}
public void xin(int[]scores){
Arrays.sort(scores);
int nums=0;
for(int i=scores.length;i>=0;i--) {
if (nums > 3) {
System.out.println("考试成绩前"+nums+"名为:");
break;
}
if (scores[i] >= 100 || scores[i] <= 0) {
continue;
} else {
nums++;
System.out.println(scores[i]);
}
}
}
}