If Strings are immutable in Java, then how can we write as:
String
String s = new String(); s = s + \"abc\";
Strings are immutable. That means that an instance of String cannot change.
You're changing the s variable to refer to a different (but still immutable) String instance.
s