about | help | code help+videos | done | prefs |
Write a method that returns the input parameter string, but with the first and last letter removed. If the input parameter is "win the game", you should return "in the gam". The only string methods you are allowed to use are .substring and .length. You may assume the input parameter string will have at least two characters. If it ONLY has two characters, you will return an empty string. ddd1RemoveFirstAndLast("Testing") → "estin" ddd1RemoveFirstAndLast("abcdefg") → "bcdef" ddd1RemoveFirstAndLast("make it shorter") → "ake it shorte" ...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: 250
Copyright Nick Parlante 2017 - privacy