 <p>If you don't have to use recursion, here's a much more efficient check for palindrome:</p> <pre><code>public boolean isPalindrome3(String input) { for (int start = 0, end = input.length() - 1; start &lt; end; ) { if (input.charAt(start++) != input.charAt(end--)) { return false; } } return true; } </code></pre>