title: Java, Check if a String is a palindrome. Case insensitive
body: <p>I want to write a java method to return true if a string is a palindrome.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>String palindrome = "...";
  boolean isPalindrome = palindrome.equals(
     new StringBuilder(palindrome).reverse().toString());
  </code></pre>
  
  <p>My problem with this is that it does not consider a word like: <code>Race car</code> to be a palindrome.</p>
  
  <pre><code>Doc, note, I dissent. A fast never prevents a fatness. I diet on cod.
  </code></pre>
  
  <p>What is the best way to test if this is a palindrome, with case insensitivity and ignoring punctuation.</p>