各位,帮忙看下这个程序有什么问题 import java.util.Scanner; public class Max_1 {
public void Input() { Scanner input = new Scanner(System.in); double max,min; String m,n; System.out.print("请输入学生人数:"); int num = input.nextInt(); String name[] = new String[num]; double score[] = new double[num]; for(int i = 0; i < num; i++) { System.out.print("请输入学生姓名:"); String a = input.next(); name[i] = a; System.out.print("请输入"+name[i]+"同学的成绩:"); double b = input.nextDouble(); score[i] = b; } max = min = score[0]; m = n = name[0]; for(int i = 1; i < num; i++) { if(max < score[i]) { max = score[i]; m = name[i]; } if(min > score[i]) { min = score[i]; n = name[i]; } } System.out.print(m+"同学的成绩最高:"+max); System.out.print(n+"同学的成绩最低:"+min);