import java.util.ArrayList;
public class ArrivalsList extends ArrayList<Integer> {
    public int first() {
        return this.get(0);
    }
    public int last() {
        return this.get(this.size() - 1);
    }
}
Is this a good way of creating a custom list? Or is there any other, better way to do this?
 
     
    