+ 2
What is mutable??
3 ответов
+ 2
I think that means the value can change (variable/mutable)
+ 2
mutable is changeable and it can be modified.
In java, string objects are immutable.
Immutable simply means unmodified or unchangeable.
Once string object is created its data or state can't be changed but a new string object is created.
example:
***********
class Testimmutablestring{
public static void main(String args[]){
String s="Karthik";
s.concat(" keyan");//concat() method appends the string at the end
System.out.println(s);//will print Karthik because strings are immutable objects
}
}
+ 1
yes Nanda you are right