title: Char cannot be dereferenced? using compareTo
body: <p>I'm trying to make a program that will read in a string and compare each character in the string to see if it is in alphabetical order.</p>
  
  <pre><code>public class Main
  {
      public static void Main ( String[] args)
      {
          System.out.println("#Please enter the string: ");
          String s = BIO.getString();
  
          while(!s.equals("END")){
              int length = s.length();
              String sLC = s.toLowerCase();
              int count = 0;
              boolean inOrder = true;
  
              for(int i = 0; i &lt; length - 1 ; i++){
                  if(sLC.charAt(i).compareTo(sLC.charAt(i+1)) &gt; 0) {
                      inOrder = false;
                      break;
                  }   
              }  
  
              System.out.println("#Please enter the string: ");  
              s = BIO.getString();
          }
      }
  }
  </code></pre>
  
  <p>I am using blueJ and when I try to compile this it is giving me the error 'char cannot be dereferenced and highlighting the 'compareTo' method in my IF statement?</p>