Four integers are read from input and stored into the array myArray. Then, numCompare is read from input. Write a static method filterArray that takes an integer array parameter and an integer parameter. For each element in the array, if the element is greater than or equal to the integer parameter, then replace the element with 1. Otherwise, replace the element with 0.Ex: If the input is:10 90 95 5061then the output is:Original array: 10 9095 50Changed array: 0 1 1 01 import java.util.Scanner;