Remember that you have overriden the equals and the hashcode methods for the class containing the main method. However, you did not really override the hashcode and the equals method for the
String class. Just as side note, you cannot override the equals and the hashcode methods for the String class because it is marked final.