Question: In Java, a function called allOf to StdIntArray which returns true if all the array or sub-array elements match the given value, and false otherwise.There
In Java,
a function called allOf to StdIntArray which returns true if all the array or sub-array elements match the given value, and false otherwise.There should be two versions, one that works with the entire array, and one that works with sub-array defined by a half-open range. The signatures should be
public static boolean allOf(int a[], int value)
public static boolean allOf(int a[], int lo, int hi, int value)
The version that works with the entire array should call the sub-array version.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
