Thou Shalt Not Name Thy Method “Equals”

(unless you really override Object.equals(), of course). I've stumbled upon a rather curious Stack Overflow question by user Frank: Why does Java's Area#equals method not override Object#equals? Interestingly, there is a Area.equals(Area) method which really takes an Area argument, instead of a Object argument as declared in Object.equals(). This leads to rather nasty behaviour, as … Continue reading Thou Shalt Not Name Thy Method “Equals”