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

 

doubles


Given a string, return a new string that repeats each letter twice. If the string is an empty string, the method returns an empty string.


doubles("hi") → "hhii"
doubles("one two") → "oonnee ttwwoo"
doubles("baby") → "bbaabbyy"

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

public String doubles(String s){ }

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

Copyright Nick Parlante 2017 - privacy