the addBatch() method is basically nothing more than a tool fro assigning a bunch of sql statements to a jdbc statement object for execution together
PreparedStatement stmt=conn.prepareStatement(
"update account set balance=? where acct_id=?");
int[] rows;
for(int i=0;i<accts.length;i++){
stmt.setInt(1,i);
stmt.setLong(2,i);
stmt.addBatch();
}
rows=stemt.executeBatch();