about | help | code help+videos | done | prefs |
Write a method called switchFirstTwoLastTwo that takes a String as it's parameter and returns a new String with the first two and last two characters switched. For example a call of switchFirstTwoLastTwo("hello") would return the String "lolhe".
switchFirstTwoLastTwo("good bye") → "yeod bgo" switchFirstTwoLastTwo("") → "" switchFirstTwoLastTwo("fish") → "fish" ...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: 100
Copyright Nick Parlante 2017 - privacy