Statement每次执行sql语句,数据库都要执行sql语句的编译.最好用于仅执行一次查询并返回结果的情形,效率高于PreparedStatement.Prepared statements offer better performance, as they are pre-compiled. Use when you plan to use the SQL statements many times.
Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods.