filmov
tv
Array vs List mutation in JAVA 🔥 must-know difference for interviews #interview

Показать описание
✅ Why list reflects changes in arr (e.g., arr[0] = "Z")
That means both arr and list point to the same underlying data.
It doesn't support structural changes like add(), remove() — because the size of the underlying array cannot change.
That means both arr and list point to the same underlying data.
It doesn't support structural changes like add(), remove() — because the size of the underlying array cannot change.