Example

public class ClassA {
public void hashCode (int key) {
}
}

Solution
Always use the standard signature for the hashCode method - public int hashCode().

public class ClassA {
public int hashCode () {
// ...;
}
}