Create a matrix where if an element in an M×N matrix is 0, its entire row and column are set to 0
comments

Comments should say why the code is like it is. Any other information to the reader should be given to the reader by the identifiers to chose. 

Your comments structure the method in 3 logical sections (the first without a dedicated comment). You should better move this three sections into separate methods with names derived from the comments:

private static int[][] setZeroes(int[][] matrix) {
    boolean[] rowsWithZero = new boolean[matrix.length];
    boolean[] columnsWithZero = new boolean[matrix[0].length];

    findZeros(matrix,rowsWithZero,columnsWithZero);
    transformColumns(matrix,columnsWithZero);
    transformRows(matrix,rowsWithZero);

    return matrix;
}
private static void findZeros(int[][] matrix, boolean[] rowsWithZero, boolean[] columnsWithZero){
    for (int i = 0; i &lt; matrix.length; i++) {
        for (int j = 0; j &lt; matrix[0].length; j++) {
            if (matrix[i][j] == 0) {
                rowsWithZero[i] = true;
                columnsWithZero[j] = true;
            }
        }
    }
}
private static void transformColumns(int[][] matrix,  boolean[] columnsWithZero){
    for (int i = 0; i &lt; columnsWithZero.length; i++) {
        if (columnsWithZero[i]) {
            transformColumn(i, matrix);
        }
    }
}
private static void transformRows(int[][] matrix, boolean[] rowsWithZero){
    for (int i = 0; i &lt; rowsWithZero.length; i++) {
        if (rowsWithZero[i]) {
            transformRow(i, matrix);
        }
    }
}