title: How do I check if a char is a vowel?
body: <p>This Java code is giving me trouble:</p>
  
  <pre><code>    String word = &lt;Uses an input&gt;
      int y = 3;
      char z;
      do {
          z = word.charAt(y);
           if (z!='a' || z!='e' || z!='i' || z!='o' || z!='u')) {
              for (int i = 0; i==y; i++) {
                  wordT  = wordT + word.charAt(i);
                  } break;
           }
      } while(true);
  </code></pre>
  
  <p>I want to check if the third letter of word is a non-vowel, and if it is I want it to return the non-vowel and any characters preceding it. If it is a vowel, it checks the next letter in the string, if it's also a vowel then it checks the next one until it finds a non-vowel.</p>
  
  <p>Example:</p>
  
  <blockquote>
    <p>word = Jaemeas then wordT must = Jaem</p>
  </blockquote>
  
  <p>Example 2:</p>
  
  <blockquote>
    <p>word=Jaeoimus then wordT must =Jaeoim</p>
  </blockquote>
  
  <p>The problem is with my <code>if</code> statement, I can't figure out how to make it check all the vowels in that one line.</p>