Write a function called
It should take a
String containing a phone number in the format
111-222-3333 and return it reformatted as
You will want to explore the various
to help you with this task.
In particular, you may find
There are solutions that use
split, others that use
substring, and probably others that use neither!
Stuck? You may find these lessons helpful: