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...
Type: Posts; User: simpson_121919
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...
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;
...
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...
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...