Question: Use a recursive helper method to make clean() more efficient, by elimitating the need to extract substrings. CleanUp.java 1 /** 2 * A recursive

Use a recursive helper method to make clean() more efficient, by elimitating the need to extract substrings. CleanUp.java 1 /** 2 * A recursive method that removes forbidden characters from a string. 3 */ 4 public class CleanUp 5 { 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 } /** * A recursive helper method. */ public static String cleanHelper (String str, String forbidden, int index) { if (forbidden. contains (current)) { } } else { } public static String clean (String str, String forbidden) { return cleanHelper (str, forbidden, str.length() - 1);
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
To make the clean method more efficient by using a recursive helper method you can fully implement t... View full answer
Get step-by-step solutions from verified subject matter experts
