title: Incompatible Types String and Char
body: <p>I'm not sure why I'm getting this error. I think the code in general is okay although I'm sure there is a shorter way then using all the else ifs. The problem is it says incompatible types and I really am just lost on how to fix this. Any help would be appreciated. </p>
  
  <pre><code>import java.util.Scanner;
  public class MissionImpossible
  {
      public static void main(String [] args){
          String lineOne,  R2D2 = "";
  
         Scanner in = new Scanner(System.in);
         System.out.println("Please enter a word so I can see how many vowels it has.");
  
         int count = 0;
  
         lineOne = in.nextLine();
  
         int word = lineOne.length();
  
         for (int i = word -1; i&gt;= 0; i--) 
          {
              R2D2= lineOne.charAt(i);
  
              if (R2D2== 'a'|| R2D2=='A')
              count++;
              else if (R2D2=='e'||R2D2=='E')
              count++;
              else if (R2D2=='o'|| R2D2=='O')
              count++;
              else if (R2D2=='u'||R2D2=='U')
              count++;
              else if (R2D2=='y'||R2D2=='Y')
              count++;
  
      }
      System.out.println(count);
            }
             }
  </code></pre>