Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 16 to 30 of 223

Q. Which of the following methods are needed for loading a database driver inJDBC?

a. registerdriver() method

b. class.forname()

c. both a and b

d. getconnection()

  • c. both a and b

Q. Which of the following is false as far as type 4 driver is concern?

a. type 4 driver is “native protocol, pure java” driver

b. type 4 drivers are 100% java compatible

c. type 4 drivers uses socket class to connect to the database

d. type 4 drivers can not be used with netscape

  • d. type 4 drivers can not be used with netscape

Q. Which driver is efficient and always preferable for using JDBC applications?

a. type – 4

b. type – 1

c. type – 3

d. type – 2

  • a. type – 4

Q. The JDBC-ODBC bridge is

a. three tiered

b. multithreaded

c. best for any platform

d. all of the above

  • b. multithreaded

Q. The class javA)sql.Timestamp has its super class as

a. java)sql.time

b. java)util.date

c. java)util.time

d. none of the above

  • b. java)util.date

Q. Which of the following is advantage of using JDBC connection pool?

a. slow performance

b. using more memory

c. using less memory

d. better performance

  • d. better performance

Q. Which of the following is advantage of using PreparedStatement in Java?

a. slow performance

b. encourages sql injection

c. prevents sql injection

d. more memory usage

  • c. prevents sql injection

Q. Which of the following is used to call stored procedure?

a. statement

b. preparedstatement

c. callablestatment

d. calledstatement

  • c. callablestatment

Q. BLOB, CLOB, ARRAY and REF type columns can be updated in

a. jdbc 1.0

b. jdbc 4.0

c. jdbc 2.0

d. jdbc 3.0

  • d. jdbc 3.0

Q. Which of the following methods finds the maximum number of connectionsthat a specific driver can obtain?

a. database.getmaxconnections

b. connection.getmaxconnections

c. databasemetadata)getmaxconnections

d. resultsetmetadata)getmaxconnections

  • c. databasemetadata)getmaxconnections

Q. When the message “No Suitable Driver” occurs?

a. when the driver is not registered by class.forname() method

b. when the user name, password and the database does not match

c. when the jdbc database url passed is not constructed properly

d. when the type 4 driver is used

  • c. when the jdbc database url passed is not constructed properly

Q. Which driver is called as thin-driver in JDBC?

a. type-4 driver

b. type-1 driver

c. type-3 driver

d. type-2 driver

  • a. type-4 driver
Subscribe Now

Get All Updates & News