We can use PreparedStatement setNull() method to bind the null variable to a parameter. The setNull method takes index and SQL Types as argument, for example
ps.setNull(10, java.sql.Types.INTEGER);.