the hashcode is NOT the address in memory of an object instance. In fact, that would yield a hashcode which is by definition incorrect as it doesn't confirm to the hashcode definition which states explicitly that two identical objects MUST have the same hashcode. As no two objects (whether identical or not) can exist in the same place in memory at the same time that's an impossibility if you take the object's memory address as the hashcode.
Well, the hashcode may be equal to (or directly derived from) the memory address, if we're talking about the implementation defined inside the Object class. But many classes override this definition of equals(), and thus they must also override hashCode() too for consistency. So in general the hashCode is probably not based on memory location, but in some cases it may be.
the hashcode definition which states explicitly that two identical objects MUST have the same hashcode.
The rule is that two objects where equals() is true must have the same hashcode. If we use the default Object.equals() method, only the same object will have equals() true. In that case, the memory address will be the same.