输入:ImageView
。
我想将它转换为字符串数组然后转换为int数组。问题是,当我用空格分割时,它会显示错误:
" 10 50 10 40 50 80 60 20 "
" 10"
" 50"
代码:
"10"
我希望它只应该是没有空格的字符串数组
s = line.split(" ");
for(i=0;i<8;i++)
{
arr= Integer.parseInt(s[i]);
System.out.println(arr);
}
"10"
"50"