Write the following method that tests whether the array has four consecutive numbers with the same value.public

Question:

Write the following method that tests whether the array has four consecutive numbers with the same value.public static boolean?isConsecutiveFour(int[] values)Write a test program that prompts the user to enter a series of integers and displays if the series contains four consecutive numbers with the same value. Your program should first prompt the user to enter the input size?i.e., the number of values in the series. Here are sample runs:image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: