Because String Class Object is Immutable. (an immutable object is an object whose state cannot be modified after it is created).
So modification is not allowed in string class in same object. If we want to reverse the String We should use StringBuffer class reverse() method.
So modification is not allowed in string class in same object. If we want to reverse the String We should use StringBuffer class reverse() method.
No comments:
Post a Comment