Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Collections which iterate bi-directionally? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Collections which iterate bi-directionally?" Watch "Collections which iterate bi-directionally?" New topic

Collections which iterate bi-directionally?

yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
I read ArrayList iterate bi-directionally. what other collections iterate bi-directionally?
Eric Pramono
Ranch Hand

Joined: Jul 09, 2001
Posts: 74
Based on the API, I think that ArrayList, LinkedList & Vector have the listIterator() method which allows them to return a ListIterator representation of the collection data.
The ListIterator interface methods are the ones that actually allow the data to read in reversed order (using previous() method).
BTW, is this a part of the 1.4 exam?
- eric
yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
Thank you. I am not sure, but it is good to know.
I agree. Here's the link:
subject: Collections which iterate bi-directionally?
jQuery in Action, 3rd edition