Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    10
    Views
    1,906

    Re: Java 2d array problem

    You should use the array's length attribute to test if the index is out of bounds.
  2. Replies
    10
    Views
    1,906

    Re: Java 2d array problem

    What is the statement definition for the array?
  3. Replies
    10
    Views
    1,906

    Re: Java 2d array problem

    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...
Results 1 to 3 of 3