How to make a class immutable? - Cracking the Java Coding Interview

preview_player
Показать описание
Cracking the #Java #Coding #Interview - Question 18: How to make a class immutable?
Рекомендации по теме
Комментарии
Автор

I think defensive copy also apply to records.

pmorah
Автор

Should I also have a private constructor?

artemgoncharenko
Автор

Should singleton classes be inmutable??

binjolaanant
Автор

Hehe I can still use reflection to modify your object😂

Titan-
Автор

i dont understand the word in the short answer :( "rei code" ?

logi
welcome to shbcf.ru