Загрузка видео...

Не удалось загрузить видео

На главную

Coding Tip 136: What is a defensive copy? #Java #JavaCodingTip #JavaCoding

34,318 просмотров • 1 год назад •via X (Twitter)

Комментарии: 4

Фото профиля Kubert
Kubert1 год назад

From a recent prod issue, defensive copying is a solid tip for data integrity, but beware of larger arrays. It introduces performance/memory overhead. Consider alternatives like immutable views, lazy copies, or partial copying when size matters. Balance safety & efficiency!

Фото профиля Deepak Lalchandani
Deepak Lalchandani1 год назад

Do you have a Java code where you can implement it using record feature in java

Фото профиля diyf
diyf1 год назад

Thanks for sharing that. I wander in which case we want to avoid the defensive copy? Should we be concerned about the memory usage of it? Or should we apply this all the time?

Фото профиля KG
KG1 год назад

Explaining copy with coffee 😂 Java is my coming from where I live (island). And we have produce great coffee too! What kind of coffee you are drinking?

Похожие видео