title: How do I get an out a value from an ArrayList from the user typing it in?
body: <p>The question the user would see it "Which car would you like?" 
  And I want to be able to call that specific car in the array list and have it print on one line. </p>
  
  <p>I'm using an if statement so that the user types in certain letters and it will spit out the specific car from the array by itself. </p>
  
  <pre><code>ArrayList&lt;Car&gt; carList = new ArrayList&lt;Car&gt;();
  carList.add(new Car("Nikolai", "Model S", 2017, 54999.90));
  carList.add(new Car("Fourd", "Escapade", 2017, 31999.90));
  carList.add(new Car("Chewie", "Corvette", 2017, 44989.90));
  
  carList.add(new UsedCar("Hyonda", "RichardPryor", 2015, 14795.50, 35987.6));
  carList.add(new UsedCar("GC", "Chirpus", 2013, 8500.00, 12345.00));
  carList.add(new UsedCar("GC", "Witherell", 2016, 14450.00, 3500.3));    
  
  String userInput = "";
  
  for (Car theList : carList) {
  
      System.out.printf(theList.getMake() + "\t " + theList.getModel() + "\t " + theList.getYear() + "\t "+ "$" + theList.getPrice());    
  }
  
  System.out.println("Which car would you like? (Please type the name)");
  userInput = scnr.nextLine();
  
  if (userInput.equalsIgnoreCase("ni")) {
      System.out.println(carList.get(0));
  } else if (userInput.equalsIgnoreCase("fo")) {
      System.out.println(carList.get(1));
  } else if (userInput.equalsIgnoreCase("ch")) {
      System.out.println(carList.get(2));
  } else if (userInput.equalsIgnoreCase("hy")) {
      System.out.println(carList.get(3));
  } else if (userInput.equalsIgnoreCase("qu")) {
      System.out.println(carList.get(6));
  
      if (userInput.equalsIgnoreCase("gc")) {
          System.out.println("Chripus or Witherell?");
      }
      if (userInput.equalsIgnoreCase("chr")) {
          System.out.println(carList.get(4));
      } else
          System.out.println(carList.get(5));
  }
  </code></pre>
  
  <p>I expected the System.out.println(carList.get()) to print out the corresponding array list excatly when the for loop runs. (Which I know the for loop works...)</p>