title: ArrayList passes empty to the function
body: <p>I am not even sure what to ask but I have been stuck in this for hours. I am trying to create an object (NodeReservation) within the class bookFlight that only contains a person or an ArrayList ("disguised as a Client"). However, this object (NodeReservation) is created with an empty ArrayList. Why could this be happening?</p>
  
  <p>This is the important part of the class bookFlight:</p>
  
  <pre><code>void bookFlight(ArrayList&lt;Persone&gt; group) {
      NodeReservation newReservation = new NodeReservation(new Group(group));
  </code></pre>
  
  <p>}</p>
  
  <p>the class Group is as follows:</p>
  
  <pre><code>public class Group extends Client{
      ArrayList&lt;Persone&gt; group;
  
  public Group(ArrayList&lt;Persone&gt; group) {
      this.group = new ArrayList&lt;Persone&gt;();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Client is just an empty class so I can use it for a class Person (that also extends to Client) but with both types of objects ending in the same hashtable.</p>
  
  <p>the class NodeReservation:</p>
  
  <pre><code>public class NodeReservation {
  NodeReservation next;
  Client client;
  
  public NodeReservation(Client client) {
      this.client = client;
      next = null;
  }
  </code></pre>
  
  <p>}</p>