Multiple Choice
Consider the method below, which displays the characters from a String in reverse order. Each character appears on a separate line. Select the statement that should be used to complete the method, so that it performs a recursive method call correctly. public static void printReverse(String word)
{
If (word.length() > 0)
{
___________________________
System.out.println(word.charAt(0) ) ;
}
}
A) printReverse(word) ;
B) printReverse(new String(word.charAt(1) ) ) ;
C) printReverse(word.substring(1) ) ;
D) printReverse(word.length() - 1) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q8: Given the following class code: public class
Q9: Recursion does NOT take place if any
Q10: A palindrome is a word or phrase
Q11: What is required to make a recursive
Q12: Assume that recursive method search returns true
Q14: A unique permutation is one that is
Q15: _ is a problem-solving technique that examines
Q16: Consider the fib method from the textbook
Q17: The method below implements the exponentiation operation
Q18: Consider the recursive square method shown below