Skip to Main Content

New to Java

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!

Integer.parseInt - zeroes on the left are lost - How to fix this?

807599Jan 17 2007 — edited Jan 17 2007
Hi

I am trying to convert a string which has few zeroes on the leftside of the nonzero digit. I use
Integer.parseInt
but then the zeroes are gone, but I need them. How do I fix this?

The number of zeroes keep on changing if the string is different, so I cannot manually add them after conversion.

Please help..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2007
Added on Jan 17 2007
2 comments
750 views