Hello
I want to parse a string which holds a integer value to an int. The Interger.parsei nt() throws an exception. e.g
If i try to execute the following code:
it throws the following exception:
However:
with only 10 characters as argument it computes fine. But i need it to parse 14 characters
I want to parse a string which holds a integer value to an int. The Interger.parsei nt() throws an exception. e.g
If i try to execute the following code:
Code:
i = Integer.parseInt("14141414141414");
Code:
Exception in thread "main" java.lang.NumberFormatException: For input string: "14141414141414" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at CoversionMethod.Konvert(CoversionMethod.java:40) at Converter.main(Converter.java:12)
Code:
i = Integer.parseInt("1414141414");
Comment