标签:
package demo;
//20153173 Yulixiang 2016.9.20
public class CommandParameter {
public static void main(String[] args) {
System.out.println("the number:" +args.length);
int i,sum=0;
for(String arg:args){
i=Integer.parseInt(arg);
sum=i+sum; //求和
}
System.out.println("sum:"+sum); //输出
}
}
标签:
原文地址:http://www.cnblogs.com/ylx111/p/5890920.html