title: Input string choice
body: <p>So I'm a beginner in Java right now and I've been playing around with strings a bit. Now I'd like to give the user an input choice <code>"Enter a or b: "</code> and give an output based on either <code>"a"</code> or <code>"b"</code></p>
  
  <p>The Code: </p>
  
  <pre><code>int a = 18;
  int b = 22;
  
  Scanner user_input = new Scanner (System.in);
  
  String first_name;
  System.out.println("Enter your first name: ");
  first_name = user_input.next();
  
  String last_name;
  System.out.println("Enter your last name: ");
  last_name = user_input.next();
  
  String full_name;
  full_name = first_name + " " + last_name;
  System.out.println("You are: " + full_name);
  
  String age;
  System.out.println("Enter a or b: ");
  age = user_input.next();
  
  String age_a;
  System.out.println("Your age is 18");
  age = user_input(a);
  </code></pre>
  
  <p>I was also thinking maybe a function could be used like: </p>
  
  <pre><code>if(user_input = a)
  {
     System.out.println("Your age is 18.");
  }
  </code></pre>