Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3657013
  • 博文数量: 365
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2522
  • 用 户 组: 普通用户
  • 注册时间: 2019-10-28 13:40
文章分类

全部博文(365)

文章存档

2023年(8)

2022年(130)

2021年(155)

2020年(50)

2019年(22)

我的朋友

分类: Java

2019-12-06 17:00:07


如果为注释掉的写法的话运行结果为


目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
源数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]


用后边的这种流的方式使用教程才是深度拷贝(使用序列化方法)


目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec4":"sec4","sec3":"sec3"}]
目标数组元素:[{"sec2":"des2","sec1":"sec1"},{"sec2":"des2","sec4":"sec4","sec3":"sec3"}]
源数组元素:[{"sec2":"sec2","sec1":"sec1"},{"sec4":"sec4","sec3":"sec3"}]


注意  引入的为





   com.alibaba
   fastjson
   1.2.58



阅读(348891) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~