title: isVowel() method with a character in a String
body: <p>I have a text file with a bunch of words. One part of my program is supposed to, based on the user input, scan this list and insert into the output file the words that contain the requested number of vowels. I have a <code>isVowel</code> method that returns a <code>boolean</code>, but it doesn't seem to work--the output is just an empty list. </p>
  
  <p>Here's the method:</p>
  
  <pre><code>public boolean isVowel(char c)
  {
      if(c=='a' || c=='A' || c=='e' || c=='E' || c=='i' || c=='I' || c=='o' || c=='O' ||     c=='u' || c=='U')
      {    
          return true;
      }    
      else
      {
          return false;
      }    
  }
  }   
  </code></pre>
  
  <p>Here's the part of the program where it is used:</p>
  
  <pre><code>public ArrayList&lt;String&gt; vowelHeavy(int n, int m)
  {
      int vowels = 0;
      while(input.hasNextLine())
      {    
          word = input.nextLine();
          if (word.length() == n)
          {
              for(int i = 0; i &lt; word.length(); i++)
              {
                  if(isVowel(word.charAt(i)) == true)
                  {
                      vowels++;
                  }
              }
              if (vowels == m)
              {
                  output.add(word);
              }
          }
          word = input.nextLine();
      }
      return output;
  }
  </code></pre>