[java] Difference between Statement and PreparedStatement

Statement interface executes static SQL statements without parameters

PreparedStatement interface (extending Statement) executes a precompiled SQL statement with/without parameters

  1. Efficient for repeated executions

  2. It is precompiled so it's faster