main(){
String[] strs = {"1","2","3"};
int[] nums = new int[strs.length];
for(int i=0;i <strs.length;i )
{
nums[i] = Integer.parseInt(strs[i]);
}
}
如何把string数组类型转换成int数组类型
最新推荐文章于 2024-06-25 18:48:18 发布
main(){
String[] strs = {"1","2","3"};
int[] nums = new int[strs.length];
for(int i=0;i <strs.length;i )
{
nums[i] = Integer.parseInt(strs[i]);
}
}