title: Palindrome Service Class and Client Class
body: <p>I have several questions I need help with.</p>
  
  <p>I'll add both my code and source code (I guess what assignment asks for clarification) in here.</p>
  
  <p>Service Class</p>
  
  <pre><code>public class Palindrome
  {    
     private String pal;
  
      public Palindrome()
      {
         pal = " ";
      }
  
      public Palindrome(String newPal)
      {          
          pal = newPal.toUpperCase();         
      }
  
      public void setPal(String initPalin)
      {
         pal = initPalin.toUpperCase();           
      }
  
      public String getPal()
      {
         return pal;
      }
  
      public boolean isPalindrome()
      {
         int left = 0;
          int right = pal.length() -1;
  
          while (pal.equals(toUpperCase))
          {
            if (pal.charAt(left) != pal.charAt(right));
               {
                   return false;
                }
                left++;
                right--;
          }
             return true;
          }
  
       public String toString()
       {
          return "Palindrome" + isPalindrome();
       }
  }
  </code></pre>
  
  <p>Client Class</p>
  
  <pre><code>import java.util.Scanner;
  
      public class Palindromeclient
      {
        public static void main(String[]args)
        {             
            String pal;
            boolean isS = false;
  
            Scanner scan = new Scanner(System.in);
  
            System.out.println("Enter statement press[enter]:");
            String userinput = scan.nextLine();
            Palindrome statement = new Palindrome(pal);
  
            isS = statement.isPalindrome();
  
            if (isS)
                System.out.println(userinput + "is a palindrome");              
            else 
                System.out.println(userinput + "is not a palindrome");              
        }      
      }
  </code></pre>
  
  <p>My coding is giving me a </p>
  
  <pre><code>Palindrome.java:34: error: cannot find symbol
          while (pal.equals(toUpperCase))
                            ^
    symbol:   variable toUpperCase
    location: class Palindrome
  1 error
  </code></pre>
  
  <p>I don't get why though, can I simply add uppercase to the set or second constructor instead, which might be able to fix my service class.</p>
  
  <p>That's my question, number one</p>