void update_function(String str)
{
//load all driver and connect to database
int z= st.executeUpdate("Update Table_name where col_1='any_value'");
}

// this is the way you update the database,...