展开全部
importjava.util.ArrayList;e68a84e8a2ad3231313335323631343130323136353331333431373266
importjava.util.List;
importjava.util.Scanner;
@authorHeYiding
publicclassScannerDemo{
publicstaticvoidmain(String[]args){
Stringprompt="请输入任意多个数字,用空格隔开:";
List<Integer>ints=readNumbers(prompt);
Integermax=null,min=null;
for(Integeri:ints){
if(max==null||i>max){
max=i;
}elseif(min==null||i<min){
min=i;
}
}
System.out.println("最大