title: Java 'if' and 'if else' statements not printing out
body: <p>I am new to Java and have recently started coding within the last week. I have tried to build some basic things and did the following: </p>
  
  <pre><code>import java.util.Scanner;
  
  public class App {
      public static void main(String[] args){
          // creating scanner object
          Scanner userSex = new Scanner(System.in);
          System.out.println("Enter your sex (male or female): ");
          String sex = userSex.nextLine(); 
          System.out.println("Thank you, you entered " + sex );
  
          // new scanner
          Scanner userAge = new Scanner (System.in);
          System.out.println("Are you a child or adult: ");
          String age = userAge.nextLine();
          System.out.println("You are a " + sex + " " + age);
  
          if (userAge.equals("child")) {
              System.out.println("children");
          } else if (userAge.equals("adult")) {
              System.out.println("adults");
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately however, only the top of the code runs. The below code doesn't run and doesn't print anything out even when I enter "child" or "adult". </p>
  
  <pre><code>if (userAge.equals("child")) {
      System.out.println("children");
  } else if (userAge.equals("adult")) {
      System.out.println("adults");
  } 
  </code></pre>