Question: WRITE A JAVA PROGRAM . Define and write a method named countVowel that accepts only a String value as its only one parameter, and returns
WRITE A JAVA PROGRAM . Define and write a method named countVowel that accepts only a String value as its only one parameter, and returns an array of integers that are the counts of each vowels in the String. The array returned by countVowel method you will create should hold precisely 5 integers: The first is the count of As, the second is the count of Es, the third is the count of Is, the fourth is Os, and the firth if Us. For example, the call countVowel(Intelligence is the ability to adapt to change. By Stephen Hawking.) should return an array containing the value [5, 7, 6, 2, 0].
Write a main program (main method) that demonstrate countVowel in action. (Use file Vowels.java)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
