Integer.parseInt()函数的使用
//返回等价于该字符串内数字的等价整数值
package com.swust.ll;
public class Summation {
public static void main(String[] args) {
int sum=0;
int myStr=0;
String str[] = {"99","55","44","1","6","5"};
for(int i=0;i<str.length;i++) {
myStr=Integer.parseInt(str[i]);
sum+=myStr;
}
System.out.println(sum);
}
}