I have two numbers and I want to use them together as a key in a Map. Currently, I\'m concatenating their string representations. For example, suppose the key n
... where a, b and hashCode are all ints. 17 is just an arbitrary prime number. Your hash will not be unique, but that's OK. That sort of thing is used all over the Java standard library.