What happens when we don't override equals and hashCode method in java classes effectively. A simple program showing mistake that can pass our eyes in first look but can be easily caught if we always use Override annotation and follow the contract of equals and hashCode methods.