Question: Write a static method String removal(String str, String removal ), No Arrays/ArrayList for this method Remove all occurrences of the removal string from the original

Write a static method String removal(String str, String removal ), No Arrays/ArrayList for this method

Remove all occurrences of the removal string from the original string. Each time you take out the removal string you must also remove the letter that preceded the removal string. After you remove a string and its leading character, you must check to see if any more occurrences of the removal string exist

Example::

xR-MxR-MHelloxR-M - String to remove R-M

Output: Hello

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!