Give me correct answer with real time example it's very Argent to me
Immutable simply means unmodifiable or unchangeable. Once string object is created its data or state can't be changed but a new string object is created. class Test{ public static void main(String args[]){ String s="Suhas"; s.concat(" Killedar");//concat() method appends the string at the end System.out.println(s);//will print Suhas because strings are immutable objects } } java uses the concept of string literal.Suppose there are 5 reference variables,all referes to one object "Suhas".If one reference variable changes the value of the object, it will be affected to all the reference variables. That is why string objects are immutable in java.