Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: Array Problem

    by Norm
    Replies
    4
    Views
    1,501

    Re: Array Problem

    How are you printing out the results?
    I get:
    System.out.println("oddNumbers=" + Arrays.toString(oddNumbers)); // oddNumbers=[5, 7, 9, 9, 9]
  2. Thread: Array Problem

    by Norm
    Replies
    4
    Views
    1,501

    Re: Array Problem

    Did the error message give the value of the index that was out of bounds?
    Was the value 5?

    Remember the maximum index of an array is the array.length -1;
    What does your for loop allow the index...
Results 1 to 2 of 2