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

 

jebbert@volusia.k12.fl.us > jan19_2018_SLHL_removeChars
prev  |  next  |  chance

Write a method that returns the 'orig' string but with all characters that match a character in 'remove' removed from the string. For example, if 'orig' is "super plan" and 'remove' is "up" then you will return "ser lan". The ONLY string methods you may use are .length, .substring, .charAt, and .equals.


jan19_2018_SLHL_removeChars("afsdwetgadfjsf", "gjdfer") → "aswtas"
jan19_2018_SLHL_removeChars("Sunday", "aSn") → "udy"
jan19_2018_SLHL_removeChars("this is a program", "his") → "t a program"

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

public String jan19_2018_SLHL_removeChars(String orig, String 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

Difficulty: 290

Copyright Nick Parlante 2017 - privacy