title: Missing return statement error in Java
body: <p>I am currently writing a palindrome tester in Java for a class I am taking in high school.  I have asked my teacher for assistance and he is also confused as well.  I was hoping the community on stackoverflow could help me out.  Thank you.</p>
  
  <pre><code>public class Palindrome
  {
      private String sentence;
      public Palindrome(String s)
      {
          sentence = s;
      }
  
      public boolean isPalindrome()
      {
          if(sentence.length() &lt;= 1)
          {
              return true;
          }
  
          if(sentence.charAt(0) == sentence.charAt(sentence.length()-1))
          {
              sentence = sentence.substring(1, sentence.length()-1);
              isPalindrome();
          }
          else
              return false;
      }
  
  }
  </code></pre>