public class ChangArgs_Exer01 { public static void main(String[] args) { Count04 c=new Count04(); int maxNum=c.max(5,3,7,15); System.out.println("最大值:"+maxNum); } } class Count04{ public int max(int num,int...other){ int max=num; //num=5; other=[]={3,9,7} //默认第一个快递的数组是 最大值 for (int i=0;i<other.length;i++){ //暂时的最大值 挨个跟other中的数字进行比较 if (other[i]>max){ max=other[i]; } } return max; } }