Calculating the minimum distance of a linear code
The n and k parameters seem pointless: you can derive them from the dimensions of the received generator matrix:

int n = generator.length;
int k = generator[0].length;




Instead of this:


for (int j = 0; j &lt; n; j++) {



You could replace using for-each, which is just more natural:

for (int[] row : generator) {




I don't really see a reason to store the parameters as fields.
The class doesn't need to hold data.
You need just a pure function,
so this can be a public static method.

Putting it together

Applying the above suggestions (+ a few minor things):

public static int getMinimumDistance(int[][] generator) {
    int n = generator.length;
    int k = generator[0].length;
    int minDistance = n;
    int maxKString = 1 &lt;&lt; k;

    // generate all k-strings
    for (int i = 1; i &lt; maxKString; i++) {
        int distance = 0;

        // matrix multiplication
        for (int[] row : generator) {
            int p = 0;
            for (int z = 0; z &lt; k; z++) {
                int a = row[k - z - 1];
                int b = (i &gt;&gt;&gt; z) &amp; 1;
                p = (p + a * b) &amp; 1;
            }
            // distance as number if 1 bits
            distance += p;
        }

        minDistance = Math.min(minDistance, distance);
    }

    return minDistance;
}


Unit testing

I recommend adding unit tests to verify your solution, for example:

@Test
public void testSampleExercise1() {
    assertEquals(3, LinearCode.getMinimumDistance(new int[][]{
            {1, 0, 0, 0},
            {0, 1, 0, 0},
            {0, 0, 1, 0},
            {0, 0, 0, 1},
            {0, 1, 1, 1},
            {1, 0, 1, 1},
            {1, 1, 0, 1},
    }));
}

@Test
public void testSampleExercise2() {
    assertEquals(0, LinearCode.getMinimumDistance(new int[][]{
            {1, 1},
            {0, 0},
            {1, 1},
    }));
}