I have one million rows of data in .txt format. the format is very simple. For each row:
user1,value1 user2,value2 user3,value3 user1,value4 ...
You k
The ArrayList values in your HashMap are references. You don't need to "put it back to HashMap". You're operating on the object that already exists as a value in the HashMap.