Question: Write a method named Middle that takes an integer array named array as a parameter and returns a boolean The method should return true if
Write a method named Middle that takes an integer array named array as a parameter and returns a boolean
The method should return true if there are three consecutive numbers that appear in the middle of the array and false otherwise.
Sample:
int[] a1 = { 5, 10, 5, 6, 7, -3, 0 }; True
int[] a4 = { 4, 26};
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
