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

 

soweigel@smsd.org java-advanced > withoutChar
prev  |  next  |  chance

Given a string and a char, (formal parameters called - base and remove), return a version of the base string where all instances of the remove char have been removed. You may assume that the remove string is length 1 or more. A sample case is

withoutChar("rubber bumper",'b') --> "ruer umper"

The sample cases show two strings. That is a CodingBat viewer problem. The second parameter is actually a char.


withoutChar("rubber bumper", "b") → "ruer umper"
withoutChar("rubber bumper", "e") → "rubbr bumpr"
withoutChar("Hello there", "e") → "Hllo thr"

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

public String withoutChar(String base, char remove) { }

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