code: public static Object convertArray(Connection conn, Collection<?> array) throws SQLException {
          return convertArray(conn, array.toArray());
      }
docs: Converts Collection into sql.Array
  
  @param conn  connection for which sql.Array object would be created
  @param array Collection
  @return sql.Array from Collection
  @throws SQLException