Share the joy
When u change the value of Mutable objects the new memory is created and new value is stored in new memory.But in immutable the value is changed in same memory, this makes immutable objects to increase the performance.so in case if the string is frequently changed in the code at run time, it is advisable to use immutable objects.
string vs string builder: String is mutable whereas string.builder is immutable.
Share the joy