14.4.4 StringBuilder append Methods
Class StringBuilder
provides overloaded append methods (Fig. 14.13) to allow values of various types to be appended to the end of a StringBuilder
. Versions are provided for each of the primitive types and for character arrays, String
s, Object
s, and more. (Remember that method toString
produces a string representation of any Object
.) Each method takes its argument, converts it to a string and appends it to the StringBuilder
.
Get Java™ How To Program (Early Objects), Tenth Edition 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.