Top 50+ Solved JAVA Networking MCQ Questions Answer

From 16 to 30 of 46

Q. Which of the following type of JDBC driver, is also called Type 1 JDBC driver?

a. JDBC-ODBC Bridge plus ODBC driver

b. Native-API, partly Java driver

c. JDBC-Net, pure Java driver

d. Native-protocol, pure Java driver

  • a. JDBC-ODBC Bridge plus ODBC driver

Q. Which of the following is not a valid type of ResultSet?

a. ResultSet.TYPE_FORWARD_ONLY

b. ResultSet.TYPE_SCROLL_INSENSITIVE

c. ResultSet.TYPE_SCROLL_SENSITIVE

d. ResultSet.TYPE_BACKWARD_ONLY

  • d. ResultSet.TYPE_BACKWARD_ONLY

Q. Which of the following type of JDBC driver, uses database native protocol?

a. JDBC-ODBC Bridge plus ODBC driver

b. Native-API, partly Java driver

c. JDBC-Net, pure Java driver

d. Native-protocol, pure Java driver

  • d. Native-protocol, pure Java driver

Q. What is JDBC?

a. JDBC is a java based protocol.

b. JDBC is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.

c. JDBC is a specification to tell how to connect to a database.

d. Joint Driver for Basic Connection

  • b. JDBC is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.

Q. Which of the following manages a list of database drivers in JDBC?

a. DriverManager

b. JDBC driver

c. Connection

d. Statement

  • a. DriverManager

Q. Which of the following is correct about JDBC?

a. JDBC architecture decouples an abstraction from its implementation.

b. JDBC follows a bridge design pattern.

c. Both of the above.

d. None of the above.

  • c. Both of the above.

Q. Which of the following step establishes a connection with a database?

a. Import packages containing the JDBC classes needed for database programming.

b. Register the JDBC driver, so that you can open a communications channel with the database.

c. Open a connection using the DriverManager.getConnection () method.

d. Execute a query using an object of type Statement.

  • c. Open a connection using the DriverManager.getConnection () method.

Q. Which of the following is true about JDBC?

a. The JDBC API is an API to access different relational databases.

b. You use it to access relational databases without embedding a dependency on a specific database type in your code.

c. JDBC stands for Java DataBase Connectivity.

d. All of the above.

  • d. All of the above.

Q. Which method is used to establish the connection with the specified url in a Driver Manager class?

a. public static void registerDriver(Driver driver)

b. public static void deregisterDriver(Driver driver)

c. public static Connection getConnection(String url)

d. public static Connection getConnection(String url,String userName,String password)

  • c. public static Connection getConnection(String url)

Q. Which driver Network connection is indirect that a JDBC client makes to a middleware process that acts as a bridge to the DBMS server?

a. JDBC-Net

b. JDBC-ODBC bridge

c. Native API as basis

d. Native protocol as basis

  • a. JDBC-Net
Subscribe Now

Get All Updates & News