Tagged articles
5 articles
Page 1 of 1
Sanyou's Java Diary
Sanyou's Java Diary
Feb 7, 2022 · Backend Development

Understanding Shallow vs Deep Copy in Java: A Practical Cloneable Guide

This article explains the differences between shallow and deep copying in Java, illustrates how the Cloneable interface and the clone() method work, provides complete code examples for both copy types, and clarifies the concept of reference copying with diagrams and test outputs.

CloneableDeepCopyObjectCloning
0 likes · 4 min read
Understanding Shallow vs Deep Copy in Java: A Practical Cloneable Guide
Sohu Tech Products
Sohu Tech Products
Jan 26, 2022 · Mobile Development

Crash Caused by Mutating a Collection During Enumeration and the Mechanics of copy vs mutableCopy in Objective‑C

This article documents a runtime crash triggered by mutating an NSMutableSet while enumerating it, explains how the Objective‑C copy attribute works, demonstrates shallow and deep copy behavior for strings and collections, and provides low‑level source analysis of the copy implementation in the Apple runtime.

CrashDeepCopyMutableSet
0 likes · 14 min read
Crash Caused by Mutating a Collection During Enumeration and the Mechanics of copy vs mutableCopy in Objective‑C
Programmer DD
Programmer DD
May 30, 2021 · Backend Development

When to Prefer Spring BeanUtils Over Apache BeanUtils for Object Copying

This article explains the difference between shallow and deep copying in Java, compares Apache BeanUtils and Spring BeanUtils with code examples, highlights performance and safety concerns, and recommends using Spring BeanUtils or alternative libraries for efficient property transfer between objects.

ApacheBeanUtilsDeepCopy
0 likes · 10 min read
When to Prefer Spring BeanUtils Over Apache BeanUtils for Object Copying