This is explicitly described in the documentation.
https://docs.oracle.com/database/121/JJDBC/apxref.htm#CHECHCJH
MATCH_RECOGNIZE clause
What? The character is used as a token in the MATCH_RECOGNIZE clause in Oracle Database 11g and later. How does the JDBC standard define? a symbol as a parameter marker, the JDBC driver and SQL Server cannot distinguish between different uses of the same token.
In earlier versions of the JDBC driver, if you want to interpret? as a MATCH_RECOGNIZE marker, and not as a parameter marker, then you should use Statement instead of PreparedStatement and turn off evacuation processing. However, starting with Oracle Database 12c Release 1 (12.1.0.2), can you use the syntax "{\ ...}" when using? character, so the JDBC driver does not treat it as a parameter marker and allows the SQL handler to process it.
source share