title: Uppercase a string input from scanner in java
body: <p>I am supposed to use the Scanner in Java to receive a 14 char input and have all the letter char output in uppercase format. I've tried entering some of the code I found through Google such as " str.toUpperCase(Locale.ENGLISH); " but it tells me str cannot be resolved and that the locale can't be resolved. When I did a search on here I got results for uppercasing specific char or counting char. I just need the specific line of input to be uppercased. </p>
  
  <p>The following is what I have at the moment. I am using eclipse java neon </p>
  
  <pre><code>  import java.util.Scanner;
  
  public class MemberIDLotz {
      // Everette Lotz
      public static void main(String[] args) {
          Scanner string = new Scanner(System.in);
  
          // We're going to get a 14 char string from a user.
          System.out.println("Please enter in a 14 character long ID");
          String name = string.next();
          str.toUpperCase(Locale.ENGLISH);
  
          string.close();
      }
  }
  </code></pre>
  
  <p>Thank you for your help in advance. </p>
  
  <p>*Edit: Ok so it is no longer giving me an error message, and yes I had simply copy and pasted the code. However when it prints out its not in upper case format. I put the following right after "String name =...." and deleted the <code>str.toUppercase()</code> line:</p>
  
  <pre><code>System.out.println(name);
  name = name.toUpperCase();`
  </code></pre>