title: Custom List in java
body: <pre><code>import java.util.ArrayList;
  
  public class ArrivalsList extends ArrayList&lt;Integer&gt; {
  
      public int first() {
          return this.get(0);
      }
  
      public int last() {
          return this.get(this.size() - 1);
      }
  
  }
  </code></pre>
  
  <p>Is this a good way of creating a custom list? Or is there any other, better way to do this?</p>