forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice hcs-strings > hcsStringsBabyTalk
prev  |  next  |  chance

Given an input String with multiple words separated by spaces, return a String with the first word repeated twice, separated by a space.

hcsStringsBabyTalk("stop in the name of the law") → "stop stop"
hcsStringsBabyTalk("My good fellows") → "My My"
hcsStringsBabyTalk("La la land") → "La La"

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

public String hcsStringsBabyTalk(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: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy