The advantage of using the double [][] brackets is clear during assignment and is a simple extension of the 1D array assignment e.g.
arr[x][y] = 3.14159; // OK works fine
println(arr[x][y]); // outputs 3.14149
if the 2D array is implemented using a class, like PVector then the equivalent might be thought of as
arr(x, y) = 3.14159; // illegal syntax will not compile
you would need something like
arr(x, y, 3.14159);
The actual syntax would be determined by the class implementation.
I assume that your students are using standard 1D array syntax [] so using [][] for assigning and retrieving values should be a logical step in their learning. The real difficulty is understanding how to create the array in the first place
So expanding on @GoToLoop’s idea this function will create a 2D array of floats
float[][] makeArray2D(int nbrCols, int nbrRows){
float[][] a = new float[nbrCols][];
for(int i = 0; i < nbrCols; i++)
a[i] = new float[nbrRows];
return a;
}
// and using it
float [][] array;
void setup(){
array = makeArray2D(9,3);
}
so the indices are [col_nbr][row_nbr] which is probably what you want for graphics but it is simple enough to change the implementation to get [row_nbr][col_nbr] indices