Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    Define the variable in ONE place at the class level and
    either assign it a value where it is defined
    or assign it a value in a method.
    Do NOT define variables with the same name in a method as...
  2. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    It looks like the code NEVER assigns a value to the class instance variable. The class instance variable is what is used in the load() method. but its value is null.
    The local variable defined in ...
  3. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    Why is the variable: pirateWordsList null? Look at where that variable is given a value. Make sure that there is NOT another variable defined that is "shadowing" the class level variable.
    Is...
  4. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    Why is the variable for the ArrayList null? Look at where that variable is given a value. Make sure that there is NOT another variable defined that is "shadowing" the class level variable.
  5. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    There are two variables on that line.
    pirateWordsList
    secretPirateWord
    What are their values?
  6. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    You can't be looking at the correct line if this is the line at 108:
    for (int i=0;i<num;i++){

    There aren't any object references on that line. You do not get the NullPointerException with a...
  7. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    Look at line 108. What variable on that line has a null value when it is executed?
    Use a println() to print the values of all the variables used on line 108 if you can't tell which is null.
  8. Replies
    18
    Views
    1,205

    [SOLVED] Re: Can't read into Array List.

    Please edit your post and wrap your code with code tags:


    YOUR CODE HERE

    to get highlighting and preserve formatting.


    Look at the line of code mentioned in the error message and find the...
Results 1 to 8 of 8