Chun,
The only reason I can think of is the difference in how Boolean and other wrapper classes are implemented.
Here you're comparing the handles (==) of the
String returned from the toString method. I'd guess that because for the Boolean class, the only 2 values they can return are either "true" or "false", it doesn't need to create a new String when the toString method is called, while the other wrapper classes do.
Class Boolean is similar to class A in their toString() methods: return literal String that is placed in the string pool and reused later.
Please look at the code above and let me know if you think I'm right.
Hungson Le
[This message has been edited by Son Le (edited January 24, 2001).]