The problem is because the equals method must be able to compare the Dummy object to any other object (not necessarily another Dummy object). Implementing it as public boolean equals(Dummy o) only...