jQuery in Action, 2nd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Collections which iterate bi-directionally? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Collections which iterate bi-directionally?" Watch "Collections which iterate bi-directionally?" New topic
Author

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: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Collections which iterate bi-directionally?
 
Similar Threads
Bidirectional Maps?
Searching a record in resultset
can i use the resultset simultaneously?
ArrayList can be iterated bidirectionaly!
Sun's New Sample 1.4 Exam