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)); } }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/10242.html