Some problems with java
I have did lot of C++ before starting java
and i am converting a c++ program to java
the program use lot of list operations
the first problem i have is no it-- is available
in a list you can need to backtrack the Iterator
I only found next() as operation on an Iterator
does'it exist a previous() function
if no is it possible to add it?
have you any experience in this topic?
Generally speaking, the Iterator<E> class does not support backward iteration. However, since you are using lists, try experimenting with ListIterator<E> instead. This has a hasPrevious() and previous() method. A ListIterator<E> extends Interator<E> but also enables you to traverse the list in either direction.
Hope that helps!