Which of the following method is static and synchronized in JDBC API?
- getConnection()
- prepareCall()
- executeUpdate()
- executeQuery()
Answer
a. getConnection()
Explanation:
The standard way to obtain a Connection object is to call the method DriverManager.getConnection() method that accepts a String containing the database connection URL. So getConnection() method is a static and synchronized method.
Comments
Post a Comment