February 2014
Beginner
1248 pages
62h 25m
English
Class StringBuilder provides methods length and capacity to return the number of characters currently in a StringBuilder and the number of characters that can be stored in a StringBuilder without allocating more memory, respectively. Method ensureCapacity guarantees that a StringBuilder has at least the specified capacity. Method setLength increases or decreases the length of a StringBuilder. Figure 14.11 demonstrates these methods.
Read now
Unlock full access