Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. [SOLVED] Re: How to iterate through an array that contains null elements

    That variable would go away but its value(a reference to an instance of a class) has been assigned to other variables that still exist.
  2. [SOLVED] Re: How to iterate through an array that contains null elements

    The middle statement here declares the variable breakfastRecipes and assigns it a value:

    LocalDate endDate = null;
    Recipe[] breakfastRecipes = new Recipe[7];
    ArrayList<Recipe>...
  3. [SOLVED] Re: How to iterate through an array that contains null elements

    A variable holds values in a program. A field is a special kind of variable.

    The variables: breakfastRecipe, lunchRecipe and dinnerRecipes are declared in two places: one as a field in the class...
  4. [SOLVED] Re: How to iterate through an array that contains null elements

    Some how the code must be executing that line before the variable is given a value. There is no way I can compile and execute the code to test it given what has been posted.

    It looks like the...
  5. [SOLVED] Re: How to iterate through an array that contains null elements

    There must be a variable with a null value.
    Where does the text of that error come from? I do not recognize it.

    Please copy the full text of the error message and paste it here. It has important...
  6. [SOLVED] Re: How to iterate through an array that contains null elements

    Do you have a question?
  7. [SOLVED] Re: How to iterate through an array that contains null elements

    Test the element is not null before trying to use it.
    if(array[i] == null)
Results 1 to 7 of 7