title: How do I make a prepared statement?
body: <p>How can I make an prepared statement of this one?</p>
  
  <pre><code>    Statement stmt = con.createStatement();
  
      long lastid = getLastId(stmt);
  
      // create a SQL query
      String strQuery = "INSERT INTO studenten " +
      " (id, naam, adres, postcode, plaats, geboren) " +
      " VALUES (" + (lastid+1) + "," +
          "'" + contact.getNaam() + "'," +
          "'" + contact.getAdres() + "'," +
          "'" + contact.getPostcode() + "'," +
          "'" + contact.getPlaats() + "'," +
        "{d '" + contact.getGeboren() + "'}" +
      ") ";
  
      stmt.executeUpdate(strQuery);      
      stmt.close();
      con.close();
  </code></pre>