swapEnds 🌶️🌶️
Write a method that takes one String parameter, s, and returns a new String with the first and last characters swapped, leaving everything in between exactly where it is. For example, swapEnds("cars") should return "sarc" - the "c" and "s" have traded places, and "ar" is untouched in the middle. You may assume s has at least two characters.
How many pieces make up the answer, and in what order? Have you gotten a single character like this before?
Where does the middle piece start and stop? Does that method's ending index include or exclude?