Do we need to memorize the methods provided in the interfaces and concrete classes from the collections framework for SCJP certification.
Louie van Bommel
Joined: Aug 17, 2004
That's the short answer.
Here's the exam objective: Collections (Exam Objective 9.1) Make appropriate selection of collection classes/interfaces to suit specific behavior requirements.
To achieve this objective, it may be useful to experiment with the methods specified in Collection interface especially add, remove, iterator. Especially iterator I wouldn't dare write the exam without coding an example of add or iterator.
Instead of memorizing method signatures, spend lots of time knowing the names of the interfaces (Collection is also an interface) and their basic feature or two:
Learn what basic features distinguish all important concrete classes (including the 5 above) in the Collections framework with regards to sorting, specifying an order, adding unique elements, and using keys. Just a note or two on each class will do:
ArrayList: simplest List implementation. Like a Vector but Vector methods are synchronized, ArrayList methods aren't. TreeSet: a set that's sorted. ... (the other 8 is an exercise for the reader)
It's useful to recognize (but not memorize the signatures of) the names of useful methods of the Collection interface: add, remove, size, contains, and iterator.
If someone tells you the name of a class or interface, you should be able to specify if it is a class or interface, if it has unique elements, if it uses keys, if it is sorted, or is ordered. If you know that much, you are doing well.