DEV Community

Cover image for 3.Stringbuilder class in java
Souravsing Pardeshi
Souravsing Pardeshi

Posted on • Updated on

3.Stringbuilder class in java

Java Stringbuilder class

  • Strings in java are immutable (not editable)

  • so to make changes in string we use this string builder class which makes the string mutable (editable)

  • there are different methods which comes with stringbuilder class as shown below
    Image Stringbuilder class in java


  • This method will simply append an string to existing string.


  • this will insert an character or strig at given position in given string.


  • this will replace certain part of string with another string.

  • it take position of string which need to be replaced.


  • this method will delete certain part of string by taking starting and ending position.

Top comments (2)

dukemagus profile image

typo on the title

souravsingpardeshi profile image
Souravsing Pardeshi

thanks, updated🙂