title: How to conver a string value to an integer
body: <p>I want to convert a string value to an integer but I can't. My statement checked </p>
  
  <p><code>=Integer.parseInt(input);</code> </p>
  
  <p>has an error, please help and thanks a lot in advance.</p>
  
  <pre><code>import java.util.Scanner;
  public class ass2a
  {
      public static void main(String []args)
      {
          Scanner reader = new Scanner(System.in);
          String input,b;
          long checked;
          System.out.print("Please enter the 12 digit:");
          input = reader.nextLine();
  
  
          if(input.length() &lt; 12)
          {
              System.out.println("The digit is less than 12.");
          }
  
          int one,two,three,four,five,six,seven,eight,nine,ten,eleven,twevle;
          checked =Integer.parseInt(input);
          System.out.println(checked);
      }
  }
  </code></pre>