Top 50+ Solved JAVA Networking MCQ Questions Answer
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
Q. Which of the following holds data retrieved from a database after you execute an SQLquery using Statement objects?
a. ResultSet
b. JDBC driver
c. Connection
d. Statement
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
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
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
Q. Which of the following manages a list of database drivers in JDBC?
a. DriverManager
b. JDBC driver
c. Connection
d. Statement
Q. Which of the following type of JDBC driver should be used if your Java application isaccessing multiple types of databases at the same time?
a. Type 1
b. Type 2
c. Type 3
d. Type 4
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.
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.
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.
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)
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
Q. JDBC RowSet is the wrapper of ResultSet,It holds tabular data like ResultSet but it iseasy and flexible to use.
a. True
b. False
c. none
d. all
Q. The ResultSet.next method is used to move to the next row of the ResultSet, making it thecurrent row.
a. True
b. False
c. none
d. all