Alamin Aji Alamin Aji - 3 months ago 37
Java Question

Remove leading zeros from a number in a string

I wanna trim this string.


How i can get just the "819780" part.

I can do it with my way, just curious is there any "elegant" or "right" way to do this.


I hope this works:

   try {
   int i=Integer.parseInt(yourString)
   }catch(Exception e)
   {//String has something more than number