Question: Method vowelCount: Write a static method named vowelcount that accepts a String as a parameter and produces and returns an array of integers representing the
Method vowelCount:
Write a static method named vowelcount that accepts a String as a parameter and produces
and returns an array of integers representing the counts of each vowel in the string. The
array returned by your method should hold elements: the first is the count of As the second
is the count of Es the third is the count of Is the fourth is the count of Os and the fifth is the
count of Us You may assume that the string contains no uppercase letters.
Examples:
vowelCount homework returns
vowelCount sun
goes down early" returns
vowelCount fly returns
Note : You can use the above examples in your main to check the methods works as intended.
Note : You can assume a legit input to the method, so no need to check for input correctness.
Tip : This method returns things, that means to check it you need to call it and store or print
result.
Tip : When working with Strings methods like chartAti and length can be useful.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
