Question: This method cannot use a helper method. Add a new method with the following header: public static int lastIndexOf(StringNode str, charch) This method must use

This method cannot use a helper method.
Add a new method with the following header: public static int lastIndexOf(StringNode str, charch) This method must use recursion to find and return the index of the last occurrence of the character ch in the string str, or -1 if ch does not appear in str. For example: = > StringNode s4 StringNode.convert("singing"); > StringNode.lastIndexOf(s4, 'n') 5 > StringNode.lastIndexOf(s4, 'i') 4 > StringNode.lastIndexOf(s4, 'x') -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
