title: Create object for each item in an arraylist
body: <p>I've been learning java for a little over a month with no previous OOP experience, so please provide simple answers!</p>
  
  <p>The project I'm working on is essentially a simple game. I take a txt file with a variable number of vehicle names, and allow a user to enter a vehicle name followed by a command.</p>
  
  <p><strong>How do I create an object for each item in an arraylist?</strong></p>
  
  <p>This is what I have so far (I put an example of what I'm trying to do in code comments):</p>
  
  <pre><code>public class VehicleApp {
  public static void main(String[] args) throws FileNotFoundException, IOException{
      File myDir = new File(System.getProperty("user.dir"));
      File myFile = new File(myDir, "vehicleNames.txt");
  
      FileReader in = new FileReader(myFile);
      BufferedReader br = new BufferedReader(in);
  
      ArrayList&lt;String&gt; vehicleList = new ArrayList&lt;&gt;();
  
      int i = 0;
      String line = null;
      while((line = br.readLine()) != null){
          vehicleList.add(line);
          System.out.println(vehicleList.get(i));
  
          //What I'm essentially trying to accomplish:
          //Vehicle vehicleList.get(i) = new Vehicle();
  
          i++;
      }
  
      br.close();
  
  
      System.out.println("Enter user input as such:\n" +
              "&lt;vehicle name&gt;, &lt;command&gt;");
  }
  }
  </code></pre>