For one assignment I just got today, I need to take a string and swap every other character. If the string is an odd length, leave the last character alone.
i cant ONLY use .length(), .charAt(), and .substring methods from the string class. NOTHING ELSE!
IN: laptop OUT: altppo
IN: speaker OUT: psaeekr
Any suggestions on how to go about this?
Thanks a million in advance!