On 5/19/10 9:11 PM, Felix Knecht wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can somebody explain, why this class [1] overrides hashCode() but not
equals()?

Well, @override is optional, and it's just a hint for the compiler, so it's pretty common that the developper forgot to add it.

I usually don't put an @override annotation to such metods (toString, hashcode, equals...) but it's probably not a good idea.

I would suggest that we ad it in any case.

--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com


Reply via email to