Add javadoc comment for the isPalindrome method.