You should use the array's length attribute to test if the index is out of bounds.
Type: Posts; User: Norm
You should use the array's length attribute to test if the index is out of bounds.
What is the statement definition for the array?
Because of the ways java handles multidimensional arrays, its possible that accessing the second dim can give a NPE. Try this:
int[][] twoD = new int[2][]; // Define only the...