Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

shallow copy

A copy that shares the objects inside the original.

A copy of an array (or 2D array) whose elements are the same references as the original's; clone() on a 2D array copies only the row references.

Examples

  • a.clone() copies an int[] fully, but for a String[][] it copies only the outer array.

Read the full section →