But why would the code ignore 3 out of 4 of the get() tests?
Here's what the code does:
The code calls the get() method
The get() method does a search and returns a value;
The
returned value is ignored. The returned int needs to be assigned to a variable.
How do you know anything is returned? As I said above, all the values returned by get() are ignored.
the output that I need printed out is simply so that I can test it!
I use println statements all the time for debugging. Their usage has nothing to do with what a method returns.