What is string builder?

Introductory video of string builder is not present in this course

@prasadnitesh202,

StringBuilder objects are like String objects, except that they can be modified. Hence Java StringBuilder class is also used to create mutable (modifiable) string object.

String in Java is immutable but we can edit a Stringbuilder object.
In questions where the string can change, we use Stringbuilder objects.

Constructors in StringBuilder:

StringBuilder(): Constructs a string builder with no characters in it and an initial capacity of 16 characters.

StringBuilder(int capacity): Constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.

StringBuilder(CharSequence seq): Constructs a string builder that contains the same characters as the specified CharSequence.

StringBuilder(String str): Constructs a string builder initialized to the contents of the specified string.