Handling character strings is supported through two final classes: String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings.
Character strings implemented using these classes are genuine objects, and the characters in such a string are represented using 16-bit characters (see Section 2.1, p. 23).
This section discusses the class String that provides facilities for creating, initializing, and manipulating character strings. The next section discusses the StringBuffer class.
The easiest way of creating ...