Sunday, 29 March 2015

Convert String To Integer

 Convert string to a number in java

public class ConvertStringToInteger {
  
           public static void main(String[] args) {
                      String number="123";
                      int num = Integer.parseInt(number);
                     System.out.println("Number="+num);

                     }
}

No comments:

Post a Comment