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();
hello.qiansanming(scores);
}
//定义方法完成成绩排序并输出前三名的功能
public void qiansanming(int[] scores){
Arrays.sort(scores);
System.out.println("考试成绩的前三名为:");
int i=0;
int j=1;
for (;i<1 ;){
if (scores[scores.length-j]>100||scores[scores.length-j]<0) {
j++;
continue;
}
i++;
int num1=scores[scores.length-j];
int num2=scores[scores.length-j-1];
int num3=scores[scores.length-j-2];
System.out.println(num1);
System.out.println(num2);
System.out.println(num3);
}
}
}