This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JavaCaps: Map allows duplicates??!!" Watch "JavaCaps: Map allows duplicates??!!" New topic
Author

JavaCaps: Map allows duplicates??!!

Jenny Hua
Greenhorn

Joined: Jul 24, 2001
Posts: 8
in JavaCaps mock test (Title-10): http://www.javacaps.com/scjp_util.html
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
Greenhorn

Joined: Jul 24, 2001
Posts: 8
Thank you very much, Jane!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaCaps: Map allows duplicates??!!
 
Similar Threads
JavaCaps Question 41
Javacaps Question 43
Javacaps-mock Q
What is JAVACAPS mock?
JavaCaps Mock exam