Fill in the code to complete the following method for checking whether a string is a palindrome.
```
public static boolean isPalindrome(String s) {
if (s.length() <= 1) // Base case
return true;
else if _____________________________
return false;
else
return isPalindrome(s.substring(1, s.length() - 1));
}```
a. (s.charAt(0) != s.charAt(s.length() - 1)) // Base case
b. (s.charAt(0) != s.charAt(s.length())) // Base case
c. (s.charAt(1) != s.charAt(s.length() - 1)) // Base case
d. (s.charAt(1) != s.charAt(s.length())) // Base case
a
You might also like to view...
Clicking the Show/Hide button on the Home tab of the Ribbon displays:
A) Clipboard content. B) formatting marks. C) headers and footers. D) styles applied to the document.
You are working on a criminal case in which a spreadsheet found on the computer system indicates that the victime transferred money to the suspect just days before the crime was committed. You provide a hard copy of the spreadsheet, printed in landscape format, along with the digital file
a. True b. False