← Unit 2 · all exercises
Saved in this browser only

Starts with a vowel

Return true when the word begins with a, e, i, o or u. Capital letters count too, so "Apple" is a yes.

boolean startsWithVowel(String word)

Solution.java
Loading editor…
Results

Examples

  • startsWithVowel(apple) → true
  • startsWithVowel(banana) → false

There are also 4 hidden tests you can't see. Solve the problem, not the examples.