Meaningless Drivel is fun!
The moose likes Mock Exam Errata and the fly likes JavaCaps: Map allows duplicates??!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JavaCaps: Map allows duplicates??!!" Watch "JavaCaps: Map allows duplicates??!!" New topic

JavaCaps: Map allows duplicates??!!

Jenny Hua

Joined: Jul 24, 2001
Posts: 8
in JavaCaps mock test (Title-10):
question #2.Which of the following allows duplicates , and introduces positional indexing.?
[a] Set
[b] Map
[c] Iterator
[d] List
To my surprise, the answer is b?! As I remember, Map doesnot allow duplicates in the collection, right?
who can help me to clear this?? Many thanks in advance!
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Jenny,
You're right. A Map cannot have duplicate keys. Believe the correct answer is 'd' List; which allows duplicates and allows you to specify an object's position within the list.
Check the API when in doubt
Hope that helps.
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Jenny Hua

Joined: Jul 24, 2001
Posts: 8
Thank you very much, Jane!
Have you checked out Aspose?
subject: JavaCaps: Map allows duplicates??!!
It's not a secret anymore!