Search:

Type: Posts; User: simpson_121919

Search: Search took 0.30 seconds.

  1. Re: Trouble with while loop and the use of the Iteration class.

    Oh I see what you're saying. By invoking the next method again I am using next item instead of the intended one that didn't get referenced because I am chaining when I shouldn't be.

    I am...
  2. Re: Trouble with while loop and the use of the Iteration class.

    yes I was hoping to return the record with id=2. I redid the method just using a variable instead of an Iterator object.



    public Product findProduct(int id)
    {
    int index = 0;
    ...
  3. Re: Trouble with while loop and the use of the Iteration class.

    The searchID holds the the ID field instance in the Product class. It retrieves it through getID method located in the Products class. The ID == searchId is to test and see if the parameter passed...
  4. Trouble with while loop and the use of the Iteration class.

    I am having a hard time with using the Iteration class. I don't know how to effectively use the "next()" method, it confuses me. When I search for the last product in the list nothing prints out...
Results 1 to 4 of 4