Convert string to int : Convert « Language Basics « Java





Convert string to int

public class ConvertStringToInt {
  public static void main(String[] args) {
    String aString = "78";
    int aInt = Integer.parseInt(aString);
    
    System.out.println(aInt);
  }
}


           
       










Related examples in the same category

1.Convert string to double
2.Convert double to string
3.Convert int to string