public class test {
public static void main(String[] args){
test t =new test();
int i=t.max(9,8,7,4,50);
System.out.print(i);
}
public int max(int...i){
int result=i[0];
for (int j=0;j<i.length-1;j++)
if (result>i[j+1]){
result=result;
}else result=i[j+1];
return result;
}
}
标签:java,int,max,最大值,result,可变,test,public
From: https://www.cnblogs.com/exact/p/16791502.html