Java Reference
In-Depth Information
matched: at
m.start()-1
, in other words. The method then appends the string specified by the second ar-
The
find()
method returns
true
three times, once for each occurrence of
"dog"
in
joke
. When the three
steps shown in the diagram have been completed, the
find()
method returns
false
on the next iteration,
terminating the loop. This leaves
newJoke
in the state shown in the last box in
Figure 15-4
. All you now