This might help you My project had a class within the same package as the class exhibiting the compilations issue... this obscured the Java's base Object class (and its equals() method). Here's the corrected code:
public boolean equals(java.lang.Object obj)
can not invoke Equals method on the primitives->Override Equals method not working -beginner 's mistake in Java
wish helps you I obtained compiling errors when overriding the Equals method more specifically at Float and Double parentheses, weight and price attributes, the HashCode method seems to work, so I don't know where the problem is in my code. The code also contains an interface Vehicle, but I don't expect the error to be from the interface. I am not sure if I understood entirely the Equals method . Can someone help me? , Simple syntax errors.
Why doesn't this equals method properly override the object.equals method?