How to copy HashMap (not shallow copy) in Java

后端 未结 5 933
情书的邮戳
情书的邮戳 2020-11-30 04:32

I need to make a copy of HashMap > but when I change something in the copy I want the original to stay the same. i.e w

5条回答
  •  遥遥无期
    2020-11-30 04:55

    You can try deep cloning. Have a look for example at https://code.google.com/p/cloning/

提交回复
热议问题