Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WeakHashMap

 
jioy uilo
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
do we need to know anything abt above and its Weak related collection object?
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam requires you to know which collections class is most appropriate for a particular application. If you take a quick look at the javadoc for the WeakHashMap then you will have all of the information that you might need for the exam.
My mock exam has a question or two on the WeakHashMap, but I don't know how much emphasis the real exam might place on that class. I know that the real exam that I had didn't have any questions on the WeakHashMap, but I can not guarantee that your exam won't have any.
The two new classes that were added to the 1.4 version of Java and the exam, LinkedHashMap and LinkedHashSet have a higher probability of showing up on your exam.
The JavaRanch Newsletter has had some tutorials on the collections framework. Just search on Collections on the newsletter page.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to Bert Bates, who knows about this sort of thing:

Interfaces: Collection, Set, Map, List, SortedSet, SortedMap

Understand when to use the following:
HashMap, Hashtable, TreeMap, LinkedHashMap
HashSet, LinkedHashSet, TreeSet
ArrayList, Vector, LinkedList

The key to these is what they're good for! What special thing they can do - you don't need to know their methods.

You need to know about iterators!

When I sat the exam, I was asked about all the above, nothing on WeakHashMap.
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Roger.
I hope that information shows up in the next version of the exam objectives.
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Just to verify agn :
Those classes that stores key/value pairs are :
HashMap
TreeMap
LinkedHashMap
any others that I missed out ?
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You forgot Hashtable. Hashtable can be used to store Key/Value pair but is not recommended.
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks,
 
Gavin Bong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anupam,
Hashtable is not recommended to HashMap because its methods are synchronized. Right ?
Gavin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic