Hi Folks,
The answer is none of these. You can compile the code
and check the same. If you see the API , then you can see that
each Wrapper class overrides the
equals() of the
Object and returns "true"
if and only if the argument is
not null and is a corresponding wrapper class object that represents the same wrapper class object value as the object being compared.
for example lets take a boolean primitive and its corresponding
wrapper class Boolean:
In case you want to compare the primitive values and the corresponding wrapper class object's value , then
you should use the
typeValue() of the corresponding wrapper class.
Lets take the boolean as the example, viz., usage of booleaValue() method of Boolean Class :
Hope your doubts are cleared now.
Ravindra Mohan.
[This message has been edited by Ravindra Mohan (edited May 22, 2001).]