Ads Area

NPTEL Programming in Java Week 11 Assignment Answers 2024

NPTEL Programming in Java  Week 11 Assignment Answers 2024



These are NPTEL Programming In Java Week 11 Assignment 11 Answers


 Q1. What is the correct order to close database resources?

a. Connection then Statement then ResultSet

b. ResultSet then Statement then Connection

c. Statement then Connection then ResultSet

d. Statement then ResultSet then Connection

Answer:


Q2. How many types of JDBC drivers there?

a. 3

b. 4

c. 8

d. 10


Answer:


For answers or latest updates join our telegram channel: Click here to join


These are NPTEL Programming In Java Week 11 Assignment 11 Answers


Q3. What is the correct sequence to create a database connection?

i. Import JDBC packages.

ii. Open a connection to the database.

iii. Load and register the JDBC driver.

iv. Execute the statement object and return a query resultset.

v. Create a statement object to perform a query.

vi. Close the resultset and statement objects.

vii. Process the resultset.

viii. Close the connection.

a. i, ii, iii, v, iv, vii, viii, vi

b. i, iii, ii, v, iv, vii, vi, viii

c. ii, i, iii, iv, viii, vii, v, vi

d. i, iii, ii, iv, v, vi, vii, viii


Answer:


Q4. Which of the following is correct about connection pooling?

a. Application server like WebLogic, WebSphere, jBoss and Tomcat provides the facilities to configure connection pooling.

b. components like Apache Commons DBCP Component can be used to configure connection pooling.

c. Both of the above.

d. None of the above.


Answer:


For answers or latest updates join our telegram channel: Click here to join


These are NPTEL Programming In Java Week 11 Assignment 11 Answers


Q5. Which of the following is used to test the operation?

a. JDBC API

b. JDBC Driver manager

c. JDBC Test suite

d. JDBC-ODBC Bridge Drivers


Answer:


Q6. The JDBC architecture consists of _________ to access a database.

a. three-tier processing models

b. two-tier processing models

c. two-tier and three-tier processing models

d. None of the above


Answer:


For answers or latest updates join our telegram channel: Click here to join


These are NPTEL Programming In Java Week 11 Assignment 11 Answers


Q7. Which of these obtains a Connection?

a. Connection.getConnection(url)

b. Driver.getConnection(url)

c. DriverManager.getConnection(url)

d. new Connection(url)


Answer:


Q8. Which class provides methods to create a client-side socket in Java?

a. ServerSocket

b. NetSocket

c. Socket

d. ClientSocket


Answer:


For answers or latest updates join our telegram channel: Click here to join


These are NPTEL Programming In Java Week 11 Assignment 11 Answers


Q9. What does JDBC stand for?

a. Java DataBase Connectivity

b. Java DataBase Connection

c. Java DataBase Control

d. Java DataBase Connector


Answer:


Q10. Which method can be used to query for a single object using JdbcTemplate?

a. queryForObject()

b. queryForList()

c. query()

d. singleQuery()


Answer:



Q1. Answer: c. Statement then Connection then ResultSet


Q2. Answer: a. 3


Q3. Answer: d. i, iii, ii, iv, v, vi, vii, viii


Q4. Answer: c. Both of the above.


Q5. Answer: a. JDBC API


Q6. Answer: b. two-tier processing models


Q7. Answer: c. DriverManager.getConnection(url)


Q8. Answer: c. Socket


Q9. Answer: a. Java DataBase Connectivity


Q10. Answer: a. queryForObject()

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Telegram Group For Nptel Answer Keys Join Now

Below Post Ad

Telegram Group For BEU BTECH Notes, PYQ, Organizer Join Now
WhatsApp Group Join Now