Here is the code we wrote today (more or less; there were slight variations between classes):

public class List {
    private int[] vals;  //items in the list
    private int num;     //number of list items
    
    public List() {  //create an empty list
        this.vals = new int[5];
        this.num = 0;
    }
    
    public void append(int item) {  //add item to the end
        vals[num] = item;
        num++;
    }
    
    public int size() {
        return num;
    }
}