Which Java statement connects to a database using a Connection object?
A) Connection conn = new Connection(url, username, password) ;
B) Conenction conn = DriverManager.getConnection() ;
C) Connection conn = DriverManager.connect(url, username, password) ;
D) Connection conn = DriverManager.getConnection(url, username, password) ;
Correct Answer:
Verified
Q52: What does the execute method return?
A)ResultSet
B)Query
C)RecordSet
D)boolean
Q53: What will the following command do?
java -classpath
Q54: The _ symbol in the query string
Q55: What is wrong with the following statement?
boolean
Q56: What will the following command do?
java -classpath
Q58: An example of a desktop database is:
A)Oracle
B)MS
Q59: Why should we use try-with-resources to open
Q60: A _ object can create statement objects
Q61: When you execute a rollback:
A)the temporary data
Q62: When you close a connection:
A)it closes the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents