Question: Please show me how to get my code right (my code is on the white background). This is for beginner Java, thank you! public class

Please show me how to get my code right (my code is on the white background). This is for beginner Java, thank you!

Please show me how to get my code right (my code is

on the white background). This is for beginner Java, thank you! public

class WithoutString { 1 2 3 4 5 /** Write the method

named withoutString(). 6 7 8 Given two strings, base and remove, return

public class WithoutString { 1 2 3 4 5 /** Write the method named withoutString(). 6 7 8 Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length 1 or more. Remove only non-overlapping instances, so with "xXx" removing "xx" leaves "x". 9 10 11 12 13 14 15 16 17 18 19 20 21 Note: Despite the term "remove" you should actually not try to remove the characters from a string. You'll continue to use the "building a string" pattern from lecture. * * Examples: withoutString("Hello there", "llo") returns "He there" withoutString("Hello there", "e") returns "Hllo thr" withoutString("Hello there", "x") returns "Hello there" @param base the base String to modify. @param remove the substring to remove. @return the base String with all copies of remove removed. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 11 // TODO - Write the withoutString method here public String withoutString(String base, String remove) { String result ""; int len = remove.length(); for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!