title: statement.executeBatch() vs statement.updateQuery() when there is only one query to be executed
body: <p>OK, I know that <strong>Batch Processing</strong> allows to group related SQL statements into a batch and submit them with one call to the database. When you send several SQL statements to the database at once, you reduce the amount of communication overhead, thereby improving performance. In this particular situation (see code below) I don't think batching does it's sole purpose. Cause <code>stmt.executeBatch()</code> is called straight away after adding a batch(?) Wouldn't <code>stmt.executeUpdate()</code> do the same thing?</p>
  
  <pre><code>public void tableChanged(TableModelEvent e) {
      int row = e.getFirstRow();
      int col = e.getColumn();
      model = (MyTableModel) e.getSource();
      String stulpPav = model.getColumnName(col);
      Object data = model.getValueAt(row, col);
      Object studId = model.getValueAt(row, 0);
      System.out.println("tableChanded works");
      try {
          new ImportData(stulpPav, data, studId);
          bottomLabel.setText(textForLabel());
      } catch (ClassNotFoundException e1) {
          e1.printStackTrace();
      } catch (SQLException e1) {
          e1.printStackTrace();
      }
  }
  public class ImportData {    
  
      public ImportData(String a, Object b, Object c)
              throws ClassNotFoundException, SQLException {
          Statement stmt = null;
          try {
              connection = TableWithBottomLine.getConnection();
              String stulpPav = a;
              String duom = b.toString();
              String studId = c.toString();
              System.out.println(duom);
              connection.setAutoCommit(false);
              stmt = connection.createStatement();
              stmt.addBatch("update finance.fin set " + stulpPav + " = " + duom
                      + " where ID = " + studId + ";");
              stmt.executeBatch();
              connection.commit();
          } catch (BatchUpdateException e) {
              e.printStackTrace();
          } catch (SQLException e) {
              e.printStackTrace();
          } finally {
              if (stmt != null)
                  stmt.close();
              connection.setAutoCommit(true);
              System.out.println("Data was imported to database");
          }
      }   
  } 
  </code></pre>