String Name Occupation Parsing
Geoffrey Challen // 2023.7.0
Write a method name parseNameOccupation
that accepts a single String
in the following format:
- "Aisha, a coder!"
- "Felip, a doctor!"
- "Gracie, a dog!"
Specifically, the input String
has the following format: "
You should return a new String
reformatted as follows: "My friend
To complete this problem you will probably want to utilize the String
methods split
and
substring
.