title: Use indexOf with an ArrayList that has multiple objects
body: <p>In the code below I would like to use <code>indexOf()</code>, but I can't find the proper way.</p>
  
  <p>Movie class:</p>
  
  <pre><code>public class Movie {
  
  
      private String title;
      private String genre;
      private String actor;
      private int yearPublished;
  
      public Movie(String title, String genre, String actor, int yearPublished) {
          this.title = title;
          this.genre = genre;
          this.actor = actor;
          this.yearPublished = yearPublished;
      }
  
      @Override
      public String toString() {
          return  title + ", Genre: " + genre + ", Actor(s):" + actor + ", Year of publishing: " + yearPublished;
      }
  
  
  
      public String getTitle() {
          return title;
      }
  
      public String getGenre() {
          return genre;
      }
  
      public String getActor() {
          return actor;
      }
  
      public int getYearPublished() {
          return yearPublished;
      }
  
  
  }
  </code></pre>
  
  <p>Controller class:</p>
  
  <pre><code>public class Controller {
  
      void start() {
          scanning();
          printing("Movies:");
          selectYourMovie();
  
      }
  
      private List&lt;Movie&gt; movies = new ArrayList&lt;&gt;();
  
      private void scanning() {
          try {
              Scanner fileScanner = new Scanner(new File("movies.txt"));
  
              String row;
              String []data;
  
              while (fileScanner.hasNextLine()) {     
                  row = fileScanner.nextLine();
                  data = row.split(";");
                  movies.add(new Movie(data[0], data[1], data[2], Integer.parseInt(data[3])));
  
              }
          } catch (FileNotFoundException ex) {
              Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);
          }
  
      }
  
      private void printing(String cim) {
          for (Movie movie : movies) {
              System.out.println(movie);
          }
      }
  
      private void selectYourMovie() {
  
          System.out.println(movies.indexOf(/*What to put here?*/);
      }
  
  }
  </code></pre>
  
  <p>And the content of the txt file:</p>
  
  <pre><code>The Matrix;action;Keanu Reeves;1999
  
  The Lord of the Rings;fantasy;Elijah Wood;2001
  
  Harry Potter;fantasy;Daniel Radcliffe;2001
  
  The Notebook;drama;Ryan Gosling;2004
  
  Step Up;drama, dance;Channing Tatum;2006
  
  Pulp Fiction;crime;Samuel L. Jackson, John Travolta;1994
  
  Star Wars: A New Hope;action;Mark Hamill;1977
  </code></pre>
  
  <p>So I would like to return the index of the given movie, but I couldn't find how to do it with a list which has multiple objects. Since passing an entire line of the txt doesn't work.</p>
  
  <p>Any hints on this?</p>