What is the difference between methods ## and hashCode?
They seem to be outputting the same values no matter which class or hashCode overloading I use. Google doesn’t help, either, as it cannot find symbol ##.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“Subclasses” of
AnyValdo not behave properly from a hashing perspective:Of course this is boxed to a call to:
We might prefer it to be:
We should expect this given that the
int1 is also thedouble1. Of course this issue does not arise in Java. Without it, we’d have this problem:Luckily: