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

 

jebbert@volusia.k12.fl.us > test2022_10_06_APP1SLHL_middle
prev  |  next  |  chance

Write a method that accepts an input parameter called 'str' and returns that string, but with the first and last characters removed from the string. As a precondition, you may assume that 'str' is at least two characters long. Look at the test data for examples.


test2022_10_06_APP1SLHL_middle("This is a test") → "his is a tes"
test2022_10_06_APP1SLHL_middle("Racecar") → "aceca"
test2022_10_06_APP1SLHL_middle("Bleep Bloop Beep Beep") → "leep Bloop Beep Bee"

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

public String test2022_10_06_APP1SLHL_middle(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

Difficulty: 220

Copyright Nick Parlante 2017 - privacy