title: Trouble checking if a string is a palindrome
body: <p>I am a beginner learning Java and have been asked to check if a given string is a palindrome.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>   int namel = name.length();
      for (int i =0; i&lt;=namel; i++)
      {
        char letter = name.charAt(i);
        char namerev = name.charAt(namel-i);
        String letterS =txtNamePali.getText();
        if(letter==namerev)
        {
           txtNamePali.setText("Palindrone");
        }
        else
        {
            txtNamePali.setText( "Not a Palindrone");
        }
      }
  </code></pre>
  
  <p>Unfortunately my textbox isn't showing any output. I have searched for how to fix the issue but couldn't find an answer relating to what I have learnt in class.</p>
  
  <p>What did I do wrong, and how can I correct it?</p>