title: How to check if a string is made only of letters and numbers
body: <p>Let's say a user inputs text. How does one check that the corresponding <code>String</code> is made up of only letters and numbers?</p>
  
  <pre><code>import java.util.Scanner;
  public class StringValidation {
      public static void main(String[] args) {
         Scanner in = new Scanner(System.in);
         System.out.println("Enter your password");
         String name = in.nextLine();
         (inert here)
  </code></pre>