Search:

Type: Posts; User: dspear

Search: Search took 0.22 seconds; generated 27 minute(s) ago.

  1. Replies
    5
    Views
    2,147

    Re: Formatting 2d Array Output

    Thank you so much.

    I put in what you had up top and it would print the first line perfectly but it threw an error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
    at...
  2. Replies
    5
    Views
    2,147

    Re: Formatting 2d Array Output

    The code that I need help with is:

    for (int i=0; i<ROWS; i++)
    {
    for (int j=0; j<COLUMNS; j++)
    {
    System.out.print(" " + numberArray[i][j]);
    }

    The problem is when I use the printf to format...
  3. Replies
    5
    Views
    2,147

    Formatting 2d Array Output

    I was wondering if there is a way to format the output of an array so that each indexed item has a discriptor and formatted in a certian way?

    Example:

    I have an array with 2 rows and 2 columns...
Results 1 to 3 of 3