Copy an object in Java

后端 未结 7 549
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 03:41

I have an object that I need to copy in Java. I need to create a copy and run some tests on it without changing the original object itself.

I assumed that I needed t

7条回答
  •  温柔的废话
    2020-12-09 04:04

    There are multiple ways to copy object in java(shallow or deep).
    This Answer will help you.

提交回复
热议问题