对方法中所有参数求和,返回和值 public int getSum(int ...a){ int s=0; for(int i=0;i<a.length;a++){ s+=a[i]; } return s; }