A
A
Artemka2017-03-26 18:09:21
Java
Artemka, 2017-03-26 18:09:21

Is it necessary to overwrite the value in HashMap?

Yes HashMap<String, List<ArrayList<String>>, I get the value by key, add data to the ArrayList and leave it. Is this the right thing to do? Or can there be hidden consequences? Or is it better to change the entire old value to a new one using replace ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kosarev, 2017-03-27
@jaxtr

Is that the right thing to do?

Yes, that's right, because The map only contains a link to the sheet. If you rewrite it, then you will just perform one useless action.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question