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

preview_player
Показать описание
✅ 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.

Рекомендации по теме
visit shbcf.ru