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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started