方法不一定需要返回值吧 我这里哪里错了哦
import java.util.Arrays;
public class HelloWorld {
//完成 main 方法
public static void main(String[] args) {
HelloWorld hello= new HelloWorld();
int[] scores={89,-23,64,91,119,52,73};
int count=0;
hello.ranks(scores);
public void ranks(int[] ranks){
int[] ranks1=Arrays.sort(ranks);
outer:
for(int i =ranks1.length-1;i>=0;i--){
if(ranks[i]<0|| ranks[i]>100){
continue;
}
count++;
System.out.println("考试的前三名为:");
System.out.println(ranks1[i]);
if(count>3){
break outer;
}
}
}
}