Multiple choice

Which JDBC driver Type(s) can be used in either applet or servlet code?

  1. Both Type 1 and Type 2

  2. Both Type 1 and Type 3

  3. Both Type 3 and Type 4

  4. Type 4 only

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

JDBC driver Type 3 and Type 4 are pure Java drivers that can be used in either applet or servlet code. Type 3 is a net-protocol driver that converts JDBC calls to a database-independent protocol, while Type 4 is a native-protocol pure Java driver. Type 1 (JDBC-ODBC bridge) and Type 2 (native API partly Java) require native libraries and are platform-dependent, making them unsuitable for applets.