
public class ChangeArgs01 {
public static void main(String[] args) {
Count04 c = new Count04();
int maxNum = c.max(5,3,9,7);
System.out.println("最大值:"+maxNum);
}
}
class Count04{
public int max (int num,int...other){
int max = num;
for (int i =0; imax){
max = other[i];
}
}
return max;
}
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)