Assume that a, b, and c refer to instances of primitive wrapper classes.
Which of the following statements are correct?
Select 2 options
Correct Options are : A E
Equals method of a primitive wrapper class are
symmetric => a.equals(b) returns same as b.equals(a) transitive => if a.equals(b) and b.equals(c) return true, then a.equals(c) returns true. reflexive => a.equals(a) return true.
For example, the following code for the equals method on Integer explains how it works:
public boolean equals (Object obj) { if (obj instanceof Integer) { return value == ((Integer)obj).intValue (); } return false; }