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

 

countVowels


Given a string, counts how many vowels exist inside the string if parameter vowel is true, otherwise it should count how many characters are not vowels.


countVowels("apple", true) → 2
countVowels("union", true) → 3
countVowels("car", false) → 2

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

public int countVowels(String str, boolean vowel) { }

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: 100

Copyright Nick Parlante 2017 - privacy