title: How to convert an int [] Array into a java.sql.Array
body: <p>i'm trying to append some integer values to my database, i have made this prepared statement</p>
  <pre><code> stmt = connection.prepareStatement(&quot;UPDATE domotica.artefatti SET id_sensori = array_append(id_sensori,?) WHERE id=?&quot;);
  
  </code></pre>
  <p>I have an integers array like this one:</p>
  <pre><code>int [] integerarray = {values...};
  </code></pre>
  <p>I would like to convert/cast it so that I can do something like this:</p>
  <pre><code>stmt.setArray(1,correctarray);
  </code></pre>