title: Shorter condition code of checking each character of a string in Java
body: <p>Here is my code to check if each character in the string is a vowel or not</p>
  
  <pre><code>if(word.charAt(i) == 'a' || word.charAt(i) == 'e' || word.charAt(i) == 'i' || word.charAt(i) == 'o' 
                      || word.charAt(i) == 'u')
  </code></pre>
  
  <p>Do I have to keep repeating word.charAt(i) for each vowel in Java ? I am repeating it 5 times in the code. Is there a shorter way or am I at the mercy of repeating code when forming my condition for the logic?</p>