I have to code a perfect Hashing table for a homework, but I'm struggling to understand:
What's the difference between the return of hashCode() and a key in a hashTable since I have to implement the methode getKey() but I only know that the index of an object x is given by ((a * x.hashCode() + b) mod p) mod m when a and b are random integers, p a prime number and m the size of the table.
Since the index is given by H(key), that means that x.hashCode() is the key in my opinion, but I'm not sure because the key and the value (only integers) are the same.