Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 1 to 15 of 223

Q. Which of the following contains both date and time?

a. javio.date

b. java.sql.date

c. java.util.date

d. java.util.datetime

  • d. java.util.datetime

Q. Which one of the following contains date information?

a. javsql.timestamp

b. java.sql.time

c. java.io.time

d. java.io.timestamp

  • a. java.sql.timestamp

Q. What does setAutoCommit(false) do?

a. commits transweraction after each query

b. explicitly commits transweraction

c. does not commit transweraction automatically after each query

d. never commits transweraction

  • c. does not commit transweraction automatically after each query

Q. Which of the following is method of JDBC batch process?

a. setbatch()

b. deletebatch()

c. removebatch()

d. addbatch()

  • d. addbatch()

Q. Which of the following is used to rollback a JDBC trAnsweraction?

a. rollback()

b. rollforward()

c. deletetransweraction()

d. removetransweraction()

  • a. rollback()

Q. Which driver uses ODBC driver to connect to the database?

a. jdbc-odbc bridge driver

b. native - api driver

c. network protocol driver

d. thin driver

  • a. jdbc-odbc bridge driver

Q. How many types of JDBC drivers are available?

a. 3

b. 4

c. 2

d. 5

Q. Which method is used for an SQL statement that is executed frequently?

a. prepare statement

b. prepare call

c. create statement

d. none of the above

  • a. prepare statement

Q. What is used to execute parameterized query?

a. statement interface

b. preparedstatement interface

c. resultset interface

d. none of the above

  • b. preparedstatement interface

Q. Which JDBC product components does the Java software provide?

a. the jdbc driver manager

b. the jdbc driver test suite

c. the jdbc-odbc bridge

d. all mentioned above

  • d. all mentioned above

Q. JDBC stands for?

a. java database connectivity

b. java database concept

c. java database communications

d. none of the above

  • a. java database connectivity

Q. Which of the following allows non repeatable read in JDBC Connection?

a. transweraction_read_uncommitted

b. transweraction_read_committed

c. transweraction_serializable

d. transweraction_repeatable_read

  • d. transweraction_repeatable_read

Q. Which of the following statements is false as far as different type ofstatements is concern in JDBC?

a. regular statement

b. prepared statement

c. callable statement

d. interim statement

  • d. interim statement
Subscribe Now

Get All Updates & News