Credex Technology Interview Question

How will you convert ArrayList to Hashmap?