The proper way to do this is to use PreparedStatement. I've rewritten OPs code below to show how this is done:
public void updateDeduction(String empId, String dedId, String dedname,String dedamount,String date) throws SQLException{
//update the contributions
PreparedStatement updateString = conn.prepareStatement("INSERT INTO deductions (empId,dedId,dedName,dedAmount,dedDate) VALUES (?, ?, ?, ?, ?)", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); // you passed in CURDATE() instead of using one of your parameters.
updateString.setString(1, empId);
updateString.setString(2, dedId);
updateString.setString(3, dedName);
updateString.setString(4, dedAmount);
updateString.setString(5, date); // you were missing this line
if (updateString.executeUpdate() == 1) return;
else throw new RuntimeException("Update failed");
}
Some comments on my code which should make it clearer as to why I used this style. The if line exists to ensure the insert was successful, as executeUpdate is defined to return the number of rows inserted in an insert context. Also, you must declare your statements as updatable if they change rows at all. Hope this helps, and if you need further assistance/explanation, please leave a comment here.