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

 

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

Write a method that accepts a string parameter and returns the string with all the characters in reverse order with dashes "-" between each character.


reverseDash("just keep swimming") → "g-n-i-m-m-i-w-s- -p-e-e-k- -t-s-u-j"
reverseDash("greetings") → "s-g-n-i-t-e-e-r-g"
reverseDash("check it out") → "t-u-o- -t-i- -k-c-e-h-c"

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

public String reverseDash(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: 299

Copyright Nick Parlante 2017 - privacy