X988: Concatenating Strings 1

The method below takes a string as a parameter. The string contains a name in the form of "<firstname>,<lastname>". This method needs to return a new string with the two parts of the name reversed, "<lastname>,<firstname>". The string does not contain any spaces, just one comma between the two parts of the name.

For example:

  • If the input string is "John,Smith", this method would return "Smith,John"
  • If the input string is "Kathy,Bee", this method would return "Bee,Kathy"

Your Answer:

Feedback

Your feedback will appear here when you check your answer.