Tag Archives: programming

How to Write an Equality Method in Java

Excellent article on how to avoid common pitfalls and preserve the contract of equals() when writing an equality method in Java. Class java.lang.Object defines an equals method, which subclasses may override. Unfortunately, it turns out that writing a correct equality … Continue reading

Posted in programming | Tagged , | Leave a comment