for (int i = 0; i < vector.length; i++) {
            if (i % 2 == 0)
                y[count++] = vector[i];
        }