Infosys interview question

The Hash function in Java