code: public static MultiPolygon removeHolesMultiPolygon(MultiPolygon multiPolygon) {
          int num = multiPolygon.getNumGeometries();
          Polygon[] polygons = new Polygon[num];
          for (int i = 0; i < num; i++) {
              polygons[i] = removeHolesPolygon((Polygon) multiPolygon.getGeometryN(i));
          }
          return multiPolygon.getFactory().createMultiPolygon(polygons);
      }
docs: Create a new multiPolygon without hole.
  
  @param multiPolygon
  @return