Search:

Type: Posts; User: Norm

Search: Search took 0.17 seconds.

  1. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    The output from println can help you see what the computer sees. I find it very useful.
  2. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    Did you print out the value that indexOf was searching for?
    What is the size of the Vector when the error occurred? Can you print it out?

    Where is the first line of the stack trace from the...
  3. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    What is the size of the Vector at line 290?
    Is 29 the value returned by the indexOf() method?
    What object was the indexOf() method searching the Vector for?

    Where is the first line of the stack...
  4. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    You need to add some printlns to debug what the code is doing to get the exception. Print out the value of the float number and the value returned by the indexOf() method just before the statement...
  5. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    Can you show what was printed out. And the code that was used.
    What indexOf() method are you using. Most versions of that method return an int value.
  6. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    what value does the indexOf() method return? Make a separate statement and print out the value returned.
  7. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    What happens when you compile and execute that code?
    what value does the indexOf() method return? Make a separate statement and print out the value returned.
  8. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    Can you explain what the problem is with using the same index in two Vectors?

    Post the output from your code and explain what is wrong with it.
  9. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    When you find the index for the float value in one Vector, then use that same index to get the corresponding String from the other Vector.
  10. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    Not true.
    You do not need to use a loop to get elements from a Vector. You can call its methods anywhere in your code.
  11. Thread: Hello Hello

    by Norm
    Replies
    22
    Views
    1,838

    Re: Hello Hello

    Please explain what you are doing and show the code that is accessing the two Vectors. If the Vectors are parallel, then an index used with each Vector's get method will return the corresponding...
Results 1 to 11 of 11