posted 22 years ago
The answer given is WRONG, all the cases evaluate to false. In wrapper classes, if the argument passed in the equal() method is of a different run-time type, then the equals method returns false. The following code prints false 3 times.
[ October 29, 2002: Message edited by: Alfred Kemety ]
Alfred Raouf - Egypt - SCJP 1.4<br />Kemety.equals(Egyptian) // returns true