Return the first item in the list, or -1 when the list is empty. An ArrayList reads with get(0), not with square brackets.
int first(java.util.ArrayList<Integer> list)
Examples
There are also 2 hidden tests you can't see. Solve the problem, not the examples.