Question: JAVA: need help coming up with a code In the class RecStuff write another static recursive method called removeLast which will take a string argument
JAVA: need help coming up with a code
In the class RecStuff write another static recursive method called removeLast which will take a string argument sPhrase, and a StringBuffer argument, sKey. The purpose of this method will be to return a string which is a copy of the original string with the last occurrence of any character that occurs in the key sequence removed from the original string. For example, consider the string The sly moon is high in the sky. If provided with a key sequence of ken, the returned string would be The sly moon is high i th sy. You can assume that the key sequence will always contain unique characters. The Method signature for this will be public static String removeLast(String sPhrase, StringBuffer sKey) Note: we are using a StringBuffer here because unlike Strings, StringBuffers can be modified.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
