Write a method that takes an array of ints and returns the
number of prime numbers in the array. You should use the
provided isPrime method.
Write a method that takes a String and returns the number of
vowels in the string. You should use the provided isVowel
method to determine whether a single character string is a vowel.
Write a method that takes a String and returns the index of
the first vowel in the string. You should use the
provided isVowel method to determine whether a single
character string is a vowel.
Write a method that takes a String and returns
a String consisting of the original String with
all the vowels removed. You should use the provided isVowel
method to determine whether a single character string is a vowel.
Write a method that takes an array of Strings and returns the
number of elements in the array that start with a vowel. You should use
the provided isVowel method to determine whether a single
character string is a vowel.
Write a method that takes an array of Strings and returns
an int representing the total length of all
the Strings in the array.
Write a method that takes an array of Strings and returns an
array of ints where each int is the index in the
corresponding String of the first letter “x” or -1 if there
is no “x” in the String.
Write a method that takes two arguments, an array of Strings
and an int, and returns the number of Strings in
the array whose length is the value given by the second argument.
Write a method that takes an array of Strings and returns a
new array of Strings that contains only the elements of the
first array whose length is four.
Write a method that takes an array of Strings and returns a
new array of Strings consisting of the all upper-case version
of the Strings in the original array.
The hailstone sequence is a sequence of numbers generated from a
starting int value by the following process:
Write a method that takes an int argument and uses it as the
starting point of a hailstone sequence and returns the length of the
sequence generated including the starting number and the
final 1.
Using the definition of a hailstone sequence from
the hailstoneLength, write a method that takes
an int argument and returns the maximum value emitted in the
sequence before it reaches 1.
Using the definition of a hailstone sequence from
the hailstoneLength, write a method that takes
an int argument and returns an array of ints
containing the sequence starting at the argument and ending
at 1.
Write a method that takes an array of Strings and returns an
11 element array of ints with each element of the result
array containing the number of Strings in the argument array
of that length except the last element which should contain a count of all
the Strings whose length is greater than or equal to ten.
You may recall these problems from CSA. However this time you need to solve them using streams.