title: Issues reading string input in Java with scanner class
body: <p>I'm pretty much a complete newbie when it comes to Java. I've dabbled a bit in python and VB.net, and that's about it. </p>
  
  <p>I'm trying to write a program in java that literally reads the user's input and displays it back to them with this code:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class InputTesting
  {   
      public static void main( String[] args )
      {
          Scanner input = new Scanner ( System.in );
  
          String str1;
  
          System.out.println("Input string: ");
  
          str1 = input.nextString();
  
          System.out.println( str1 );
      }
  }
  </code></pre>
  
  <p>And I get the error: </p>
  
  <pre><code>InputTesting.java:13: error: cannot find symbol
          str1 = input.nextString();
                      ^
    symbol:   method nextString()
    location: variable input of type Scanner
  1 error
  </code></pre>
  
  <p>Can someone tell what why it's not compiling? Thanks!</p>