Question: . Write a class named Consecutive that creates an array of Strings in main. The values should be a list of first names. Write a
. Write a class named Consecutive that creates an array of Strings in main. The values should be a list of first names. Write a method named consecutive that takes in the array, and determines whether there is the same name present in two consecutive locations. The method must be recursive and should return a boolean. Call the method from main and indicate whether there are two consecutive names.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
