• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

ArrayList can be iterated bidirectionaly!

 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


#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?

Regards,
cmbhatt
 
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


Yours,
Bu.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chandra,

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

Thanks
 
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic