Engineering Full Stack Apps with Java and JavaScript
Assume that a, b, and c refer to instances of primitive wrapper classes. Which of the following statements are correct?
Note: Although primitive wrapper classes are not explicitly mentioned in the exam objectives, we have seen some candidates get questions on this aspect of wrapper classes.
Select 2 options
A. a.equals(a) will always return true.
B. b.equals(c) may return false even if c.equals(b) returns true.
C. a.equals(b) returns same as a == b.
D. a.equals(b) throws an exception if they refer to instances of different classes.
E. a.equals(b) returns false if they refer to instances of different classes.