about | help | code help+videos | done | prefs |
insideOut(String) reverses the characters in both the first half and the last half of the string. If the string has an odd number of characters, the middle character is unaffected. SOLVE THIS PROBLEM WITHOUT A LOOP! You will need to use the following HELPER function: String stringReverse(String str) { StringBuffer buffer = new StringBuffer(str); buffer = buffer.reverse(); return buffer.toString(); }RUBRIC: It is not enough to just solve the problem. Make sure you use PROPER INDENTATION. You MUST use CURLY BRACKETS for all if/else statements. Also, the more EFFICIENT your solution, the higher your grade. If you have extraneous (superfluous / unnecessary) code, deductions will be taken. insideOut("LOOTS-speed") → "STOOL-deeps" insideOut("denimSTRAP") → "minedPARTS" insideOut("PEELSserif") → "SLEEPfires" ...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