Allora (con PreparedStatement)
UPDATE listaprodotti SET disponibilita = disponibilita + ? WHERE ....condizione....
Dove il ? deve essere chiaramente un parametro numerico.
La condizione del WHERE in questi casi tipicamente è su un ID specifico della tabella. Es. WHERE id = ?
Andrea, andbin.dev – Senior Java developer – SCJP 5 (91%) • SCWCD 5 (94%)
java.util.function Interfaces Cheat Sheet — Java Versions Cheat Sheet