What does \"precompiling\" a statement do, because I have seen that if I write a prepared statement with a bad SQL syntax that compilation does not report any problem!
'statement compilation' is something that happens on the database which helps it return results faster and more efficiently. If you use a PreparedStatement then it allows the database to reuse a statement which was already compiled and saves having to do it again. Bad SQL will likely result in a badly compiles database statement, but not always.