
operator is intended to be a String concatenation operator because its
operands are a String and an int.
Some useful methods of the String class are summarized in Table 3.4.
The length Method
The length method returns the number of characters in a String. Some-
times, the number of characters in a user ID is limited, for example, to
eight, and this method is useful to ensure that the length of the ID does not
exceed the limit.
3.7 The String Class 117
TABLE 3.4 String Methods
String Class Method Summary
Return value Method name and argument list
int length( )
returns the length of the String
String toUpperCase( )
converts all letters in the String to upper ...