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

 

jebbert@volusia.k12.fl.us > countVowels
prev  |  next  |  chance

Write a method that has a string input parameter and returns the number of vowels (a, e, i, o, or u) in the string.


countVowels("lisa bart maggie") → 6
countVowels("This is a test") → 4
countVowels("You know not to count y as a vowel") → 11

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

public int countVowels(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

Difficulty: 204

Copyright Nick Parlante 2017 - privacy