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.
Free Spring Boot Tutorial - 5 Hours Full Course
Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course