title: Java Else If Statements - Code Not Working?
body: <p>My code is very basic as I started Java this week. However, I cannot seem to get my else if statements working. Here is my code:</p>
  
  <pre><code>import java.util.Scanner;
  
  class RestaurantMain {
      public static void main(String[] args)
      {
          //Variables//
          int choice;
  
          //EndVariables//
          Scanner in = new Scanner(System.in);
  
          System.out.println("Welcome to the Cooper's restaurant system!");
          System.out.println("How can I help?");
          System.out.println("");
          System.out.println("1. Customer System");
          System.out.println("2. Management System");
          System.out.println("");
          System.out.println("");
          System.out.println("Which option do you choose: ");
          choice = in.nextInt();
  
          if (choice == 1); {
              System.out.println("You have entered the customer system!");
          }
  
          else if (choice == 2); {
              System.out.println("You have entered the management system!");
          }
  
      }
  }
  </code></pre>
  
  <p>This is the error I am getting:</p>
  
  <pre><code>RestaurantMain.java:26: error: 'else' without 'if'
              else if (choice == 2); {
              ^
  1 error
  
  Tool completed with exit code 1
  </code></pre>
  
  <p>I have no idea what to do. I am using TextPad and I have had my else if statements (not these ones specifically) work in another file.</p>
  
  <p>Thanks for helping if you can!</p>