After struggling for 2 days I could not find the solution. But what I got is that we need to use for (String key : copy.keySet()) I am still not used to enhanced for loop. Can someone please convert the enhanced for loop to longer version of for loop? And, little explanation will also help. Thank you