We know that String is immutable object. We can not change the value
of a String object once it is initiated. If we try to change the value of
the existing String object then it creates new object rather than changing
the value of the existing object. So incase, we are going to do more
modificatios on String, then use StringBuffer. StringBuffer updates the
existing objects value, rather creating new object.
I'm Nataraja Gootooru, programmer by profession and passionate about technologies. All
examples given here are as simple as possible to help beginners. The source code is compiled and tested in my dev environment.
If you come across any
mistakes or bugs, please email me to [email protected] or you can comment on the page.