Can I just create a primitive array of ArrayList?
I tried the ArrayList of ArrayLists thing - I think it's ugly and counter intuitive.
I can't seem to come up with the correct syntax.
ArrayList<Coordinate>[] moves = new ArrayList<Coordinate>[5]; //"generic array creation"
import java.util.ArrayList;
public class Sandbox
{
ArrayList<Coordinate>[] c;
public Sandbox()
{
c = new ArrayList[5];
c[0] = new ArrayList<Coordinate>();
c[0].get(0) = new Coordinate(1, 3); //<----unexpected type
}
}