1 posts in topic
Flat View  Flat View

Posted By:   pradeep_kharvi
Posted On:   Friday, July 27, 2001 10:23 AM

I have a string like this

String event_srno = "20010727012937"

now i want to convert it to Integer

so i use
int eventno = Integer.parseInt(event_srno);

but it gives me this error

java.lang.NumberFormatException: 20010727012937

can anyone guide me

Re: NumberFormatException

Posted By:   Anonymous  
Posted On:   Monday, July 30, 2001 10:20 PM

This is really a standard Java language question, not specific to the 400 at all. By reading the JLS, you would see that the minimum and maximum values of an int are -2,147,483,648 and 2,147,483,647, respectively. If you want to get the value 20,010,727,012,937 you need a long.
About | Sitemap | Contact