title: ArrayIndexOutOfBoundsException when trying to create an array list of user input
body: <p>I want to have the user assign strings to the 2 arrays. Then I want him to be able to type a number after the assignment to pull up the value assigned to  the string.</p>
  
  <pre><code>import java.util.Scanner;
  public class Main {
  
      public static void main (String[]args) {
  
      Scanner keyboard = new Scanner(System.in);
  
      String customerList[] = new String[2];
  
      customerList[1] = keyboard.nextLine();
      customerList[2] = keyboard.nextLine();
  
  
      System.out.println("Which array  value  would you like to see?");
  
      int listNum = keyboard.nextInt();
  
          System.out.println(customerList[listNum]);
      }
  
  }
  </code></pre>