Hi, Angela, it is not so easy to give a complete list of all possible comparisons. In my understanding, if some class does not override the equals method, it will find and use the equals method in its super class till Object where equals is defined, where the equals() method does the same thing as ==.
And String, File, Date as well as Boolean, Byte, Short, Character, Integer, Long, Float, Double all override the equals() method. The comparison between two objects of them, the result will be true if the two objects are logically the same.
See the following code for more understanding:
Hope it helps,
------------------
Guoqiao Sun
Sun Certified Programmer for
Java 2 Platform
try my mock exam¹² at
my homepage.