Question: The following problems use String manipulation to practice recursive methods. As part of your answer include comment(s) to identify: the base case and the recursive
the base case and
the recursive call.
Problem 1:
Write a recursive method that outputs a string in reverse on the console via the reverseDisplay(String) method.
public void reverseDisplay(String value)
{
// TODO: complete the implementation
}
Problem 2:
Rewrite reverseDisplay(String) using a private helper method reverserHelper(String, int) to pass the substring int high index to the method.
Use then following helper method signature:
private void reverserHelper(String value, int high)
{
// TODO: complete the implementation
}
Step by Step Solution
There are 3 Steps involved in it
Problem 1 Java code for the method reverseDisplay to display the input String in reverse order metho... View full answer
Get step-by-step solutions from verified subject matter experts
