code: public static int min(int[][] matrix) {
          int m = matrix[0][0];
  
          for (int[] x : matrix) {
              for (int y : x) {
                  if (m > y) {
                      m = y;
                  }
              }
          }
  
          return m;
      }
docs: Returns the minimum of a matrix.