Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

WeakHashMap

 
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?
 
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.
 
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.
 
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 ?
 
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,
 
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
 
Beware the other head of science - it bites! Nibble on this message:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic