I am very new to Generics and try to get hold of it.. I am having a small assignent for Adding two methods boolean remove(E obj): and Iterator<E> iterator( ): in the class given below...
boolean remove(E obj): Remove a piece of data from the binary search tree. Return true if the data was removed, or false if it was not in the tree to begin with. Follow the algorithm involving removing items from binary search trees.
Iterator<E> iterator( ): Return an Iterator that can iterate through the data in the tree. The iteration should be an "in-order" iteration (i.e., ascending order). Recall that iterators have the following methods:
boolean hasNext( )
T next( )
void remove( )
It does additional to the list correctly.
I just want it to return Iterator<E> ... since It looked for the implementation for these methods and found that the implementation of these method is given by in