Using the methods explained in Segment 483, you can
readily extract strings representing integers from a line of text. Then,
to convert those strings to integers, you use parseInt
, a static
method of the Integer
class, as in the following example, in which
the result is an integer.
Integer.parseInt("4") --> 4