Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    The results of the condition being tested inside the loop is not being used for anything. The condition needs to be in an if statement.

    if(condition) {
    do this
    }else {
    do that
    }
    Then...
  2. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    use a for loop like where the array was filled. Instead of assigning a random number to the array element, compare it against the user's input.
  3. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    One place I see i being used is in the for loop to index into the array where the random numbers are being stored. i does not contain a random number.


    There needs to be a loop that iterates...
  4. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    Where is the variable i defined and given a value?
  5. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    Use this statement (with your array name) to print the contents of the array :

    System.out.println("an ID "+ java.util.Arrays.toString(theArrayName));
  6. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    What does the code do now?
    When does it completely fill the array with numbers?
    When does it ask the user for input?
  7. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    Should ALL the random numbers be set BEFORE the user is asked for input?
  8. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    Where is the i you are talking about defined?
    Where is i assigned the random values?
  9. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    What is in the variable: i?
  10. Replies
    22
    Views
    1,342

    [SOLVED] Re: Need help displaying the location of array index

    What variable holds the index location? What problem are you having displaying the contents of that variable?
Results 1 to 10 of 10