以下代码将不会运行并继续在错误是“线程中的异常“main”java.lang.NumberFormatException:对于输入字符串:“SAN 1905 1808+24 1512+17 1209+10 1708 -06 2016-16 211831 211941 192652"""
intAlt = Integer.parseInt(strAlt);
我不确定为什么会发生这种情况,并希望就此事提供任何建议
private int getPos(String strAlt)
{
int intAlt;
int intPos =0;
intAlt = Integer.parseInt(strAlt);
switch (intAlt)
{
case 3:
intPos = 4;
break;
case 6:
intPos = 9;
break;
case 9:
intPos = 17;
break;
case 12:
intPos = 25;
break;
case 18:
intPos = 33;
break;
case 24:
intPos = 41;
break;
case 30:
intPos = 49;
break;
case 34:
intPos = 56;
break;
case 39:
intPos = 63;
break;
}
return intPos;
}