Programming in Java - - Unit 14 - Week 11 _
Programming in Java - - Unit 14 - Week 11 _
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
Week 3 : () 2) Which method executes a simple query and returns a single Result Set object? 1 point
a. executeQuery()
Week 4 : ()
b. executeUpdate()
Week 5 : () c. execute()
d. run()
Week 6 : ()
Yes, the answer is correct.
Score: 1
Week 7 : () Accepted Answers:
a. executeQuery()
Week 8 : ()
3) What is the correct order to close database resources? 1 point
Week 9 : ()
a. Connection then Statement then ResultSet
b. ResultSet then Statement then Connection
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=98&assessment=444 1/4
13/11/2024, 15:28 Programming in Java - - Unit 14 - Week 11 :
Lecture 52 :
a. java.sql.Connection
JDBC—III
(unit? b. java.sql.DriverManager
unit=98&lesso c. java.sql.Statement
n=100)
d. java.sql.Driver
Lecture 53 : Yes, the answer is correct.
Demonstration Score: 1
—XX (unit? Accepted Answers:
unit=98&lesso b. java.sql.DriverManager
n=101)
Week 11 :
Programming
Assignment 1
(/noc24_cs105 Which of the following statement is FALSE?
/progassignme
nt?name=424) a. 3306 is the default MySQL port.
b. Database name is ‘nptel’
Week 11 :
Programming c. The database server is hosted on IP 127.0.0.1
Assignment 2 d. Password for ‘java’ user is ‘joy’
(/noc24_cs105
/progassignme Yes, the answer is correct.
Score: 1
nt?name=425)
Accepted Answers:
Week 11 : d. Password for ‘java’ user is ‘joy’
Programming
Assignment 3 7) Which resources have their close() method called when this code runs? 1 point
(/noc24_cs105
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=98&assessment=444 2/4
13/11/2024, 15:28 Programming in Java - - Unit 14 - Week 11 :
/progassignme
nt?name=426)
Week 11 :
Programming
Assignment 4
(/noc24_cs105
/progassignme
a. No close() methods are called
nt?name=427) b. Only Statement
Week 12 : ()
9) The executeUpdate method can be used with 1 point
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=98&assessment=444 3/4
13/11/2024, 15:28 Programming in Java - - Unit 14 - Week 11 :
https://onlinecourses.nptel.ac.in/noc24_cs105/unit?unit=98&assessment=444 4/4