Java OCA OCP Practice Question 2007

Question

How many of Connection, Driver, and DriverManager are JDBC interfaces included with the JDK?.

  • A. None
  • B. One
  • C. Two
  • D. Three


C.

Note

Connection is an interface for communicating with the database.

Driver is tricky because you don't write code that references it directly.

It is a JDBC interface.

DriverManager is used in JDBC code to get a Connection.

However, it is a concrete class rather than an interface.

Since Connection and Driver are JDBC interfaces, Option C is correct.




PreviousNext

Related