Search:

Type: Posts; User: javapenguin

Search: Search took 0.08 seconds.

  1. Replies
    10
    Views
    1,906

    Re: Java 2d array problem

    Here's a loop that would go through the values in your 2D array and print them out. It uses the .length thing.

    for (int i = 0; i < grid.length; i++)
    {
    for (int j = 0; j < grid[i].length; j++)...
  2. Replies
    10
    Views
    1,906

    Re: Java 2d array problem

    Please post the code.


    int[] value;
    value = new int[1];

    System.out.println(value[0]);

    That prints 0 despite not being set.
Results 1 to 2 of 2