Multi-dimensional Arrays
- Java does not explicitly support multi-dimensional arrays. Instead it
uses arrays of arrays.
- The syntax is as follows:
String array1[][] = new String[5][4];
- This creates what is effect a 2-dimensional array, but Java is
not limited to this.
- For instance, if you wanted to represent a class schedule
as an array, you would want a 5 (or maybe 7) by X array, where 5 or 7 is the number of days in your
week and X would be the number of class meetings you have that day.