Created
February 25, 2016 11:10
-
-
Save abbath0767/a594320cb6d4d6f4765c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Vowels { | |
public static int getCount(String str) { | |
int vowelsCount = 0; | |
vowelsCount = str.length() - str.replaceAll("a|e|i|o|u", "").length(); | |
return vowelsCount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment