Write a method called swappairs that accepts a string as a


Write a method called swapPairs that accepts a String as a parameter and returns that String with each pair of adjacent letters reversed. If the String has an odd number of letters, the last letter is unchanged. For example, the call swapPairs("example") should return "xemalpe" and the call swapPairs("hello there") should return "ehll ohtree"

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a method called swappairs that accepts a string as a
Reference No:- TGS0571809

Expected delivery within 24 Hours