id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

davereed@creighton.edu > removeEnds
prev  |  next  |  chance

removeEnds() -- You are given a String and want to remove the first and last characters of the String. Your function should return the revised String. Note: you may assume that string contains at least one character.


removeEnds("apple") → "ppl"
removeEnds("banana") → "anan"
removeEnds("one two") → "ne tw"

...Save, Compile, Run (ctrl-enter)

public String removeEnds(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy