title: Recursive Palindrome
body: <p>First of all I am not telling anyone to "do my homework." I just need a little help on how to keep repeating a process. This is the program I did below and it has a tester class with it.</p>
  
  <p>The class:</p>
  
  <pre><code>class RecursivePalindrome {
      public static boolean isPal(String s)
      {
          if(s.length() == 0 || s.length() == 1)
              return true;
          if(s.charAt(0) == s.charAt(s.length()-1))
              return isPal(s.substring(1, s.length()-1));
          return false;
      }
  }
  </code></pre>
  
  <p>Then the tester class which has the main method:</p>
  
  <pre><code>public class RecursivePalindromeTester {   
      public static void main(String[] args)
      {
          RecursivePalindrome  Pal = new RecursivePalindrome ();
  
          boolean quit = true;
          Scanner in = new Scanner(System.in);
          System.out.print("Enter a word to test whether it is a palindrome or not(press quit to end.): ");
          String x = in.nextLine();
          while(quit) {
              boolean itsPal = Pal.isPal(x);
              if(itsPal == true){
                  System.out.println(x + " is a palindrome.");
                  quit = false;
              }
              else if (x.equals("quit")) {
                  quit = false;
              }
              else {
                  quit = false;
                  System.out.println(x + " is not a palindrome.");
              }
          }
      }
  }
  </code></pre>
  
  <p>This program find if the letter is Palindrome or not. I got all the calculations and stuff in but what do i do to keep asking the user for input and every time the user inputs it says if it is a Palindrome word or not. </p>