这个代码怎么改就可以输出前3名成绩,谢谢
package com.qibu;
import java.util.Scanner;
import java.util.Arrays;
public class Qibujava {
public static void main(String[] args){
Qibujava hello=new Qibujava();
int[] nums=hello.ChengJi();
System.out.println("前3名的分数为:"+Arrays.toString(nums));
}
public int[] ChengJi( ){
int[] nums={89,-23,64,91,119,52,73};
Arrays.sort(nums);
int count=0;
for(int i=nums.length-1;i>=0;i--)
{
if(nums[i]<0||nums[i]>100){
continue;
}
count++;
if(count>3){
break;
}
}
return nums;
}
}