a[i] =sc.next(); 有问题,没办法传入整型参数
package com.imooc;
import java.util.Arrays;
import java.util.Scanner;
public class HelloWord {
public static void main(String [] args){
Scanner sc=new Scanner(System.in);
int i=0;
int a[]=new int[]{};
while(i!=-1){
a[i] =sc.next();
i++;
}
Arrays.sort(a);
int b=a.length;
System.out.println(a[b]);
}
}