Uma Charan Gorai·Nov 23, 2024Why String is immutable in JavaIn Java, String is immutable because once a String object is created, its state (value) cannot be changed. Any modification to a String…
Dilshan·Apr 9, 2022What is an immutable object?Once we create an object, we can’t change the object and also can’t modify the object. When we consider getters and setters, the getter is…