14.3.5 Extracting Substrings from Strings
Class String
provides two substring
methods to enable a new String
object to be created by copying part of an existing String
object. Each method returns a new String
object. Both methods are demonstrated in Fig. 14.6.
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.