Veena - I'm not sure I understand how your code listing applies to your question, sorry. But I can tell you this much: For collections you need to understand the purposes and features of these: Collection, Map, Sorted Map, Set, Sorted Set, List And you need to understand the purposes and features of these: HashSet, LinkedHashSet, TreeSet, LinkedList, Vector, ArrayList, Hashtable, LinkedHashMap, HashMap, TreeMap. You also need to understand how iterators work. You don't need to know all the methods, it's really about why would you use one vs. another. Which ones allow dups, which ones are ordered...
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Just to add to what Bert said ... You must be clear about the purpose of the classes and interfaces. Suppose, for instance, you are looking at LinkedList and ArrayList: which would be more suitable if: 1. You are mainly adding elements to the end of the list 2. You are mainly adding elements not to the end of the list 3. You are mainly retrieving elements by using an index 4. You are mainly deleting elements from the list 5. You need to implement a FIFO queue 6. You need to implement a pushdown stack 7. You need to implement an LRU cache 8. You need to implement a map 9. You need to implement a set [ September 14, 2003: Message edited by: Roger Chung-Wee ]
Hi Bert, Can we also assume that exam expects you to know Collection good enough you can read and understand code littered with collections easily. So that you can answer other questions testing some other skills. Just like anonymous classes. As you book says that exam is littered with code involving these classes while testing knowledge some other area. Thanks Barkat