Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.NumberFormatException: For input string

807588Apr 23 2009 — edited Apr 23 2009
Hi To All,

i got an exception when i try to parse a string.

String s = "51958444223";
int it = Integer.parseInt(substring);


Exception in thread "main" java.lang.NumberFormatException: For input string: "51958444223"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:459)
at java.lang.Integer.parseInt(Integer.java:497)

I am using latest java on Linux (Ubuntu 8.04)
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2009
Added on Apr 23 2009
12 comments
9,500 views