Java JDBC MCQs with answers Page - 1

Here, you will find a collection of MCQ questions on Java JDBC. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

S

Satya • 3.38K Points
Extraordinary

Q. What does JDBC stand for?

  • (A) Java DataBase Connectivity
  • (B) Java Database Connection
  • (C) Java Database Connectivity
  • (D) Java Driver Based Connectivity

S

Satya • 3.38K Points
Extraordinary

Q. Which package contains JDBC classes?

  • (A) java.jdbc
  • (B) javax.jdbc
  • (C) java.sql
  • (D) javax.sql.driver

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used to establish a connection with a database?

  • (A) Statement
  • (B) Connection
  • (C) Driver
  • (D) ResultSet

S

Satya • 3.38K Points
Extraordinary

Q. Which class is used to load the JDBC driver (traditional method)?

  • (A) Driver.load()
  • (B) Class.forName()
  • (C) DriverManager.loadDriver()
  • (D) System.loadDriver()

S

Satya • 3.38K Points
Extraordinary

Q. Which class manages JDBC drivers?

  • (A) Driver
  • (B) DriverLoader
  • (C) DriverManager
  • (D) ConnectionManager

S

Satya • 3.38K Points
Extraordinary

Q. Which method is used to create a SQL statement?

  • (A) createStatement()
  • (B) executeStatement()
  • (C) getStatement()
  • (D) newStatement()

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used for executing static SQL queries?

  • (A) PreparedStatement
  • (B) CallableStatement
  • (C) Statement
  • (D) ResultSet

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used for precompiled SQL statements?

  • (A) Statement
  • (B) PreparedStatement
  • (C) CallableStatement
  • (D) Connection

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used to call stored procedures?

  • (A) PreparedStatement
  • (B) CallableStatement
  • (C) Statement
  • (D) ProcedureStatement

S

Satya • 3.38K Points
Extraordinary

Q. Which method executes SELECT queries?

  • (A) executeUpdate()
  • (B) executeQuery()
  • (C) execute()
  • (D) runQuery()

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ