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

 

zbaharav@kehillah.org 66-sortingprep > replaceAsWithBs
prev  |  next  |  chance

Given a string, return a new string that replaces all the ocurrances of character A in the given string with character B. Don't use the replace method of the String class. (Difficulty Level: 3)


replaceAsWithBs("ABCDE") → "BBCDE"
replaceAsWithBs("ABAB") → "BBBB"
replaceAsWithBs("Access") → "Bccess"

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

public String replaceAsWithBs(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

Copyright Nick Parlante 2017 - privacy