Give me correct answer with real time example it's very Argent to me
String class is immutable in java because ,in java if there are multiple variable refers to the single object then if we change one variables value then it will affect on other variables also ,that is why String is immutable so that we can not change string of an object if we will try to change value it will not affect on exiestance object but it can create new object and then assign new value to variable in new object ...