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

 

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

Write a method that removes dashes from an input string. The input string will always starts with a non-dash symbol. After that, every-other symbol will be a dash. You may only use the string methods: .length .charAt .substring


oceanRemoveDash("T-h-i-s- -i-s- -a- -t-e-s-t") → "This is a test"
oceanRemoveDash("a-e-r-t-r-y-x") → "aertryx"
oceanRemoveDash("1-2-3") → "123"

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

public String oceanRemoveDash(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: 250

Copyright Nick Parlante 2017 - privacy