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

 

andersoniii.edwin@cusd80.com > hangMan1
prev  |  next  |  chance

Write the method called “hangMan1”. This method receives a string and returns a String where each letter has been replaced with a hyphen. Given: I Love Java this would return - --- ---- DO NOT USE THE UNDERSCORE. We will assume the words are separated by just one space. No beginning or ending space.


hangMan1("I Love Java") → "- ---- ----"
hangMan1("Math Is For Champions") → "---- -- --- ---------"
hangMan1("What a good day") → "---- - ---- ---"

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

public String hangMan1( String phrase){ }

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: 100

Copyright Nick Parlante 2017 - privacy