public class ArrayStatsRunner {
public static void main(String[] args) {
Scanner scanner = new Scanner([Link]);
// Accept user input for the array size
[Link]("Enter the size of the array: ");
int n = [Link]();
// Accept user input for the array elements
int[] arr = new int[n];
[Link]("Enter the array elements: ");
for (int i = 0; i < n; i++) {
arr[i] = [Link]();
}
// Accept user input for the group size to count
[Link]("Enter the group size to count: ");
int size = [Link]();
// Create an ArrayStats object and calculate the number of groups of the
given size
ArrayStats stats = new ArrayStats(arr);
int result = [Link](size);
// Output the results
[Link]("Array: " + [Link]());
[Link]("Number of groups of size " + size + ": " + result);
[Link]();
}
}