Hello all,
I am currently trying to create my own Iterator for my own LinkedList class as part of a task, it's implementation must mirror that of the
Java API LinkedList.
My BasicLinkedList works fine, however I have become a bit stuck working on its anonymous Iterator class, that should have a hasNext(), next() and remove() method.
At the moment it can hasNext() and print out the next() of all items in the list
except for the first.
Here is my code.
BasicLinkedList:
Anonymous Iterator Class:
Inner Node Class:
Any help is appreciated, many thanks!
Cheers.