Marc & co,
I have another question regarding equals(). We know that every class extends from the main class Object and every class overrides the Object class equals() method. But how do we know/remember the implementation details of the equals method in every class in the API.
For example, consider the Vector class. This class has overridden the equals method. Now, let's say I have a Vector object and a Linked List object and they have the same contents. So if I do a v.equals(l) it will return true. But if I compare the Vector object with a TreeSet object having the same contents they are not equal i.e. v.equals(t) will return false. The API says that equals() method of Vector will return true only when compared with a list object which explains this anamoly.
So, my question is for the exam, do I need to understand the implementation details of equals() method in every class in the API. If not, what are the important classes. To name a few,I know String and Wrapper classes are important.
Thanks.