id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

davereed@creighton.edu > numVowels
prev  |  next  |  chance

numVowels() -- You are given a String and want to count the number of vowels that occur in the String. For simplicity, any occurrence of 'a', 'e', 'i', or 'u' (regardless of case) is considered a vowel.


numVowels("apple") → 2
numVowels("banana") → 3
numVowels("bananarama") → 5

...Save, Compile, Run (ctrl-enter)

public int numVowels(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy