Connect to GitHub to push and pull your project files to a repository.
On the page that opens, create a token with repo scope, copy it, then paste it below.
Paste the personal access token you created on GitHub with repo scope.
Click Refresh to load commit history
Exercise Info
Goals
To do proper string indexing
To use conditional statements appropriately
To keep track of auxiliary variables within loops
Instructions
Fill in the method countVowels to count the number of vowels (both lowercase and uppercase, not including y or Y) in a string. Recall that the method charAt of the String class returns a character at a particular index, and, like arrays, strings are zero-indexed. For instance, if
String s = "I love CS";
, then
s.charAt(3)
returns the character o.
Recall also that the length() method of the String class returns the total number of characters in the string.