J.P. Morgan interview question

HashMap internal struction, how to retrieve of object when object of same type having same hashcode, in microservices XML passed to client what considerations and why serialzation used.