
13.4 Programming Activity 1: Checking for a Palindrome 965
Figure 13.11
Sample Final Screen for
Programming Activity 1
tion is shown in Figure 13.11. When the argument String of our recursive
method become “here”, the recursive calls stop and the method returns false.
Task Instructions
Inside the method recursivePalindrome of class PalindromeClient, write the
code to solve the palindrome problem:
■
The recursivePalindrome method header has already been coded
for you. Write the code to check if the parameter of the method,
pal, is a palindrome. Return true if it is, false if it is not. Your
method should be recursive, that is, it should call itself. We ha ...