Regards
Shri..
SCJP 5.0
could someone solve this with a good explanation for me please??
Regards
Shri..
SCJP 5.0
but i am confused with 3rd one.. how is the answer "can be true" possible if a.equals(b) is true.. shouldn't it be always true?
Shrinath M Aithal wrote:thanks Mr. Henry, ya.. you are right.. I am feeling like crucifying myself now... how do i delete this thread from here please.?
Regards
Shri..
SCJP 5.0
shouldn't .equals() be returning true, as in if I tried comparing two Integer or String objects?
Regards
Shri..
SCJP 5.0
Shrinath M Aithal wrote:you mean to say "it is useless to type equals, rather use ==" because they both do same job ?
so how many other classes out there are really like this? I mean, if StringBuffer doesn't know how to check deeply enough, then how many other classes are doing the same way?
if asked in exam, how can i be sure, it does deep compare or not?
SCJP 6 || SCWCD 5
.. but i am confused with 3rd one.. how is the answer "can be true" possible if a.equals(b) is true.. shouldn't it be always true?
given that... a.equals(b) then, a == b ________________
Regards
Shri..
SCJP 5.0
------------------------
Bob
SCJP - 86% - June 11, 2009
Consider Paul's rocket mass heater. |