Question: Write a recursive method called reverseString that takes a string as a parameter. Return the string in reverse order. Hint Use the substring string method
Write a recursive method called reverseString that takes a string as a parameter.
Return the string in reverse order.
Hint
Use the substring string method to return a substring of another string.
This method can take one or two arguments.
If you are using only one argument, this represents the start of the substring and will include the remainder of the string.
If you are using two parameters, the first number represents the start of the substring and the second number represents the end exclusive of the substring.
Expected Output
If the method call is reverseStringcat then the method would return tac
If the method call is reverseStringhouse then the method would return esuoh
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
