Iterator iter = myList.iterator();
while(iter.hasNext()) {
iter.next();
}
The simple way would be to just reverse the elements in myList first and then iterate through the items. However, my professor says we can't do that for this assignment and we should do it by only manipulating the pointing system of the hasNext()/next() functions. Kinda stomped! Any ideas?
This post has been edited by DecafJava: 18 August 2009 - 11:01 AM

New Topic/Question
Reply



MultiQuote





|