Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

a doubt in wrapper classes

807607Oct 12 2006 — edited Oct 16 2006
i have a scjp question which iam finding conflicting answers..can anyone help me...The question in the book goes...

Given that b and c refer to instances of wrapper classes, which two statements are
true? (Choose two)
A. b.equals(b) returns true.
B. b.equals(c) returns the same result as b == c.
C. b.eqials(c) can return false even if c.equals(b) returns true.
D. b.equals(c) throws an exception if b and c are different wrapper types.
E. b.equals(c) returns false if the type of wrapper objects being compared are
different.
Answer: B, C(acc.to the book)

B i can understand but how can C..I think it is E..Anyone plz help me..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2006
Added on Oct 12 2006
25 comments
262 views