Integer.parseInt(f.trim())中String f要加trim() 如int a=Integer.parseInt(f.trim());语句中String 转换成int 时 f要加trim()方法,不然会抛出异常。