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 |
Get Java For Dummies Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.