-6 java parseint numberformatexception
public static void main(String[] args)throws IOException {
String s ="12312a";
int x = Integer.parseInt(s);
System.out.println (x+2);
}
Run Code Online (Sandbox Code Playgroud)
而我所拥有的只是:
Exception in thread "main" java.lang.NumberFormatException: For input string: "12312a"
任何提示?
| 归档时间: |
|
| 查看次数: |
121 次 |
| 最近记录: |