aspose file tools*
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 Java 8 in Action this week in the Java 8 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!
 
Consider Paul's rocket mass heater.
 
subject: JavaCaps: Map allows duplicates??!!
 
Similar Threads
JavaCaps Question 41
Javacaps-mock Q
What is JAVACAPS mock?
Javacaps Question 43
JavaCaps Mock exam