How to use an Iterator in java
Hi, My question is on how to use an Iterator in java. I understand that it is an interface with three methods, but someone said to me that Iterator is also a method in the Iterator class file. After defining the hasNext(), etc. methods, how would I use the iterator and define something of that type? I've tried to look up information on iterators, but I haven't found a good explanation of it anywhere.
Using various user commands, we are to add words to the list (keeping the list in abc order), remove words from the list, print the current list, and check if a certain word is in the list. I have to use iterator in this program.