Java中把字符串数组转换成整型数组
public class Test { public static void main(String[] args) { String [] str={"1","2","3"}; int [] num=new int[str.length]; for(int i=0;i<num.length;i++){ num[i]=Integer.parseInt(str[i]); } System.out.println(Arrays.toString(num)); } }