title: Looping for array lists and adding values which match two array lists into a new one
body: <p>I'm trying to make a program that matches a clients interests with aspects of a holiday, I have an array list of holidays and an array list of strings for the clients interests and I wanted to create a new array list which would add all elements that are contained in both. This is what I have but it comes up with a null pointer exception, Any ideas where I've gone wrong?
  the debugger points towards the disjoint and at " int c1size = c1.size();"
  Relevant parts of code...</p>
  
  <p>In main...</p>
  
  <pre><code>ClientExt1 marina = new ClientExt1("Marina",14321,"marina.calder1@btinternet.com");
  ArrayList&lt;String&gt; interests = new ArrayList&lt;&gt;();
  interests.add("History");
  interests.add("Music");
  marina.setInterests(interests);
  holidaySeller.getHolidayMatches(marina);
  </code></pre>
  
  <p>Client...</p>
  
  <pre><code>public class ClientExt1 {
  
  private String name;
  private int id;
  private String email;
  private HolidayExt1 holidayBooked;
  private ArrayList&lt;String&gt; interests;
  
  public ClientExt1(String name, int id, String email){
      this.name=name;
      this.id=id;
      this.email=email;
  
  
  }
  
  public void setInterests(ArrayList interests) {
      this.interests=interests;
  }
  
  public ArrayList&lt;String&gt; getInterests(){
      return interests;
  </code></pre>
  
  <p>Company class...</p>
  
  <pre><code>public class CompanyExt1 {
      protected ArrayList&lt;StaffExt1&gt; staffMembers;                  
      protected ArrayList&lt;HolidayExt1&gt; holidays;
      protected ArrayList&lt;GuideExt1&gt; holidayGuides;
      protected ArrayList&lt;AdventureExt1&gt; adventureHolidays;
      protected ArrayList&lt;CultureExt1&gt; cultureHolidays;
      private ArrayList&lt;String&gt; matchedHolidays;
  
  
      public ArrayList&lt;String&gt; findHolidayMatch(ClientExt1 client) {
          ArrayList interests = client.getInterests();
          int i;
          for (i = 0; i &lt; holidays.size() &amp;&amp; i&lt; interests.size(); i++) {
              if (!Collections.disjoint(holidays.get(i).getAspects(), interests)) {
                  matchedHolidays.add(holidays.get(i).getName());
  
              }
          }
          return matchedHolidays;
      }
  
      public void getHolidayMatches(ClientExt1 client){
          System.out.println(client.getName() + ", the holidays recommended to you based on your interests from this company are:" + findHolidayMatch(client));
      }
  }
  </code></pre>