2013-12-22 24 views
-3

我不使用ParseException和ı在因特網中找不到。所以請你可以舉例ParseException?我在等你的代碼。請幫幫我 ???ParseException爲數字java

//how is try?? 

catch(ParseException e){ 
} 
+1

您好,歡迎計算器!不幸的是,現在你的問題並不清楚。你想實現什麼? –

回答

-2

Try塊將作如下

try{ 
Integer intValue = Integer.parseInt("String"); 
} catch (Exception e){ 
e.printStackTrace(); 
} 
+1

http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String):'parseInt',引發'NumberFormatException' –