Please Write Java Array List 3 Count Like Problem Start 1 String Array Wordlist One String Q37272643

Please write in Java and Array list.

3 THE COUNT LIKE PROBLEM

Start with 1 String array wordList and one String word. Yourmethod should calculate and return the number of times that wordappears in the array wordList.

countLike({“a”, “a”, “b”, “c”}, “a”) → 2

countLike({“a”, “a”, “b”, “c”}, “c”) → 1

countLike({“a”, “a”, “b”, “c”}, “3”) → 0

4 THE AVERAGE EVENS PROBLEM

Start with an int array named nums. Return the average of allthe even numbers in the array. A number (n) is even if n % 2 == 0.If there are no even numbers in the array, return -1.

averageEvens({1, 2, 3}) → 2.0

averageEvens({1, 5}) →

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.