posted 20 years ago
Chapter 10: Fundamental Classes
Exam 4 / Q. 12
Compiled as it is, the result is: true, true
The answer given is: true, false
The explanation given by Dan is correct if the assignment of h4 is changed to h4=sb2.hashCode(). Moreover, I guess that's the only purpose of having sb2 in this question. Do you guys agree?
I was very reluctant to report this out as I've studied almost all the questions on Dan's exams (except on Collections) and haven't found any other mistake so far. I won't be surprised if I'm missing something here.
Most of the questions are unambiguous and explanations lucid (thanks to Dan).
Thanks
Harwinder