about | help | code help+videos | done | prefs |
Write a method that accepts a string parameter and returns the string with its first and last characters swapped. You may assume the string has at least two characters. The ONLY string methods you may use are .length, .substring, .charAt, and .equals. You do not have to use all of these string methods. You may also use any NON-string methods and operations. dec1_2017_APSLHL_swap("xyz") → "zyx" dec1_2017_APSLHL_swap("abcdefg") → "gbcdefa" dec1_2017_APSLHL_swap("qw") → "wq" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy