JDBC MCQ

JDBC MCQ

  • Janhavi Jaiswal
  • 10th Mar, 2022

Practice here the best JDBC MCQ Questions, which are very popular & asked various times. This JDBC MCQ Test contains the best 20+ JDBC Multiple Choice Questions, which cover the important topics of JDBC. for which, you can perform best in JDBC Exams, Interviews, and Placement activities.

Practice Best JDBC MCQ Questions;

1) What JDBC stands for?

  • A. Java Database Connect
  • B.Java Database Connectivity
  • C.Java Developer Council
  • D.None of the above

2) JDBC is an .......... for the programming language Java.

  • A. API
  • B.Framework
  • C.Database
  • D.JVM

3) JDBC is developed by ...................

  • A. Microsoft
  • B.Google
  • C.Oracle Corporation
  • D.None of the above

4) The JDBC classes are contained in the ...........

  • A. java.sql
  • B.javax.sql
  • C.Both java.sql & javax.sql
  • D.None of the above

5) The JDBC API supports ........... processing models for database access.

  • A. 2 Tier
  • B.3 Tier
  • C.4 Tier
  • D.Both 2 & 3 Tier

6) Which of the following method returns the object of java.lang.Class object?

  • A. Class.Name()
  • B.Class.forName()
  • C.Class.Attributes()
  • D.Class.forAttribute()

7) JDBC drivers are ...............

  • A. 2 Types
  • B.4 Types
  • C.6 Types
  • D.8 Types

8) What are the major components of the JDBC?

  • A. DriverManager, Statement, and ResultSet
  • B.DriverManager, Driver, Connection, and Statement
  • C.DriverManager, Driver, Connection, Statement, and ResultSet
  • D.None of the above

9) JDBC classes are defined in which packages?

  • A. sql and javax.sql
  • B.rdb and javax.rdb
  • C.jdbc and java.jdbc.sql
  • D.None of the above

10) ........... method is used to perform DML statements in JDBC.

  • A. execute()
  • B.executeUpdate()
  • C.executeQuery()
  • D.None of the above

11) Which of the followings data type is used to store files in the database table?

  • A. CLOB
  • B.BLOB
  • C.ELOB
  • D.All of the above

12) Which of the following is the correct option to register a JdbcOdbcDriver?

  • A. jdbc.odbc.JdbcOdbc obj = new sun.jdbc.odbc.JdbcOdbc();
  • B.jdbc.JdbcOdbcDriver obj = new sun.jdbc.JdbcOdbcDriver();
  • C.odbc.JdbcOdbcDriver obj = new sun.odbc.JdbcOdbcDriver();
  • D.jdbc.odbc.JdbcOdbcDriver obj = new sun.jdbc.odbc.JdbcOdbcDriver();

13) ............. are used by Java programmers while using JDBC in their programs.

  • A. 2
  • B.4
  • C.6
  • D.8

14) Which of the following driver is the fastest one?

  • A. JDBC Net Pure Java Driver
  • B.JDBC-ODBC Bridge Driver
  • C.Native API Partly Java Driver
  • D.None of the above

15) Which is not a valid statement in JDBC?

  • A. Statement
  • B.QueryStatement
  • C.CallableStatement
  • D.PreparedStatement

16) Which of the following methods are required to load a database driver in JDBC?

  • A. forName()
  • B.registerDriver()
  • C.getConnection()
  • D.Both forName() & registerDriver()

17) Which of the following option contains both date and time?

  • A. java.io.date
  • B.java.util.date
  • C.java.util.dateTime
  • D.None of the above

18) Which of the following is first characters of a database URL?

  • A. db:
  • B.jdbc,
  • C.jdbc:
  • D.None of the above

19) ............ class/interface manages a list of database drivers.

  • A. Driver
  • B.DriverCon
  • C.ManageDriver
  • D.Driver Manager

20) The machine must have what loaded and running to run a compiled Java program?

  • A. Java bytecode
  • B.A Web browser
  • C.Java virtual machine
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.