Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
What is immutable class in java?
4 Respostas
+ 3
it basically means an object canāt be changed by other code down the line
+ 1
It means object is created, we cannot change its content. InĀ Java, because immutable class are final class also instances member are also final so we can not extend that class .
+ 1
The concept of immutatabilty, is when, after and object is created it cannot have ANY of its data (fields) be modified or āmutatedā.
This is usually done by encapsulation and the removal of all setters (or anything that can manipulate and change the data within) and only expose getters which return pointers if the data.
- 1
Cc