StringBuilder Class
Package: java.lang
StringBuilder represents a mutable sequence of characters. That is, a string that can be changed. This sets it apart from the String class, which represents an immutable sequence of characters. StringBuilder can be more efficient than String in applications that do a lot of string maniuplations.
Constructors
|
Constructor |
Description |
|
|
Creates a new empty |
|
|
Creates a new |
Methods
|
Method |
Description |
|
|
Appends the string representation of the primitive type to the end of the string. |
|
|
Calls the object’s |
|
|
Appends the string to the end of the |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access