File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ArrayList can be iterated bidirectionaly! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ArrayList can be iterated bidirectionaly! " Watch "ArrayList can be iterated bidirectionaly! " New topic

ArrayList can be iterated bidirectionaly!

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1710

#176 Which three are true for class java.util.ArrayList? (Choose three.)

(1) It can contain duplicates
(2) Its methods are thread-safe
(3) Can be iterated bi-directionally <--
(4) It implements java.util.Set
(5) It is well-suited for fast random access
(6) It implements java.util.Collections

Source: "Giri Mandarika" (Link provided in JavaRanch)

How option 3?

Is option 3 talking about ListIterator, because only that can be used to iterate the list bidirectionally?

Is ListIterator in the exam? It is Iterator (with two methods hashNext() and next() as I know), that is discussed in K&B!

Please Help?


Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Hi ranchers,

Chandra asked
Is option 3 talking about ListIterator?

Must be, yes. ListIterator has got the hasPrevious() method that the ordinary Iterator does not have.

But since you obviously know this, I wouldn't care if ListIterator on the exam.


all events occur in real time
madhu v pe
Ranch Hand

Joined: Apr 21, 2007
Posts: 100

Are you preparing for SCJP1.5 ? if so, pls specify your exam date.

I agree. Here's the link:
subject: ArrayList can be iterated bidirectionaly!
It's not a secret anymore!