14.3.2 String Methods length, charAt and getChars
String
methods length, charAt and getChars return the length of a String
, obtain the character at a specific location in a String
and retrieve a set of characters from a String
as a char
array, respectively. Figure 14.2 demonstrates each of these methods.
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.