- [Instructor] In this Self Check exercise,
we'd like you to test out replacing substrings
by starting with this original string containing spaces
and replacing each space with a space, two dashes,
a greater than sign, and another space.
So, go ahead and pause the video to give that a shot,
then come back for the answer.
Okay, let's go ahead and reveal that.
So as you can see,
we're calling directly on the string literal,
its method replace, and we're going to replace
every space character with the string
that we specified in the problem statement,
and indeed, there are the replacements.