I have a class MyDoublyIterator<E> that implements the Iterator<E> interface. Also, it has a couple other methods not part of the interface (for example public void boolean hasPrev()). When I try to call that method in my main class my IDE can't resolve that method.
Here's the code I'm using to call it
Iterator<String> di = new MyDoublyIterator<String>();
di.hasPrev();
So I guess my question why can't it find that method. Do I have to build an abstract class that implements the interface and extend it?
ListIterator<T>provides a bidirectional iterator, right?