Checking if a String is a Palindrome in Java

A palindrome is a string which, when reversed, is the same string. The following code contains two implementations of checking if a string is a palindrome: isPalindrome() works by iteratively …