public static void main(final String[] args) {
        final Integer[] array = new Integer[] { 3, 4, 9, 1, 2, 7, 4, 5, 1 };
        final List results = extract(array, 4);
        for (int i = 0; i < results.size(); i++) {
            System.out.println(results.get(i));
        }
    }