Choose Your Language

Tuesday 18 June 2013

Casting Numeric String to Integer Using Java

Class CastingStringToInt{
public static void main(String a[]){
      String input="12345";
      int output=Integer.parseInt(input);
      System.out.println(output);
      }
}

output
12345

No comments:

Post a Comment