Credex Technology interview question

How will you convert ArrayList to Hashmap?