title: How to make an array for every object within an array?
body: <p>I have a code that picks out items from a list, and I have a scanner go through the file (which has movies and then actors per each line) and add movies to an array.  How would I make it so that every single movie it adds to the arraylist also stores the actors that come after it on the line?  For example: 
  one line would be Movie Name (Date)/LastName, FirstName/Lastname2, Firstname2/ and so on for each line.  My code includes a class Movie which turns the Movie Name into a string.  How would I be able to at any given point search for any movie and have it pull up all the actors that starred in it?  </p>
  
  <pre><code> public void loadDataFromFile(String fileName){
      /**
       * This method takes in one parameter, a file name, and prints out the data from that file
       */
      Scanner theScanner3 = null;
      myMovies = new ArrayList&lt;Movie&gt;();
          try{    
           theScanner3 = new Scanner(new FileInputStream(fileName));}
  
          catch(Exception ex){
              System.err.println("IndexOutOfBoundsException: " + ex.getMessage());
              }
  
          while( theScanner3.hasNextLine()){
          int i = 1;
          i = i+1;
              Movie foo = new Movie(theScanner3.nextLine());
              myMovies.add(foo);
  
          }
          theScanner3.close();
          }
  </code></pre>
  
  <p>I need to be able to search for a movie's name and have it return to me every actor on the same line as that movie.  However, I have no clue how to do this.</p>