title: operator < cannot be applied to java
body: <p>As below I've typed <strong>javac App.java</strong> on mac Terminal and I see <strong>operator</strong> five errors, all are the same. I'm not sure how to fix it as below and I appreciate your pointers?</p>
  
  <p>I've import javabook.*; and this is JAVA code on Textpad. </p>
  
  <pre><code>import javabook.*;              
  //import java.util.Scanner;         
  
  class App
  {
      public static void main(String args[])
      {
  
  
          //declare variable
          String theNumber;
  
          //declare object
          Scanner someInput;
  
          //input
          System.out.println("Please enter area size : ");
          someInput = new Scanner(System.in);
          theNumber = someInput.nextLine();
  
          //processing
  
          if ( theNumber &lt; 20 )
          {
              System.out.println( "It is too small." ) ;
          }
          else if ( theNumber &gt; 20 &amp;&amp; theNumber &lt; 40 )
          {
              System.out.println( "It is perfect size." ) ;
          }
  
          else if ( theNumber &gt; 40 &amp;&amp; theNumber &lt; 60 )
          {
              System.out.println( "It is too big." ) ;
          }
  
          //close the program without error
          System.exit(0);
      }
  }
  </code></pre>
  
  <p>Terminal response as <strong>App.java:28: operator &lt; cannot be applied to java.lang.String,int
          if ( theNumber &lt; 20 )</strong></p>
  
  <p>I would appreciate your help?</p>
  
  <p>UPDATED:</p>
  
  <pre><code>import javabook.*;              //Same result Scanner or javabook. Tried both and it worked.
  import java.util.Scanner;       //this is required
  
  class App
  {
      public static void main(String args[])
      {
  
  
          //declare variable
          //String theNumber;
          //int theNumber = Integer.parseInt(someInput.nextLine());
  
          int theNumber; //need to convert your string theNumber to an int first. If you search for that, you'll find lots, both here and on the internet generally.
          int a = Integer.parseInt(theNumber);
          //theNumber = someInput.nextInt(); //this is commented out so now down to two errors
  
          //declare object
          Scanner someInput;
  
          //input
          System.out.println("Please enter area size : ");
          someInput = new Scanner(System.in);
          theNumber = someInput.nextLine();
  
          //processing
  
          if ( theNumber &lt; 20 )
          {
              System.out.println( "It is too small." ) ;
          }
          else if ( theNumber &gt; 20 &amp;&amp; theNumber &lt; 40 )
          {
              System.out.println( "It is perfect size." ) ;
          }
  
          else if ( theNumber &gt; 40 &amp;&amp; theNumber &lt; 60 )
          {
              System.out.println( "It is too big." ) ;
          }
  
          //close the program without error
          System.exit(0);
      }
  }
  </code></pre>