in Education by
Which of the following is used to rollback a JDBC transaction? (a) rollback() (b) rollforward() (c) deleteTransaction() (d) RemoveTransaction() The question was posed to me in an internship interview. This intriguing question originated from JDBC in section Java Beans & JDBC of Java Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Correct answer is (a) rollback() To explain: rollback() method is used to rollback the transaction. It will rollback all the changes made by the transaction.

Related questions

0 votes
    Which of the following is advantage of using JDBC connection pool? (a) Slow performance (b) Using more memory (c) ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is method of JDBC batch process? (a) setBatch() (b) deleteBatch() (c) removeBatch() (d ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is used to rollback a JDBC transaction? (a) rollback() (b) rollforward() ( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following is used to call stored procedure? (a) Statement (b) PreparedStatement (c) CallableStatment (d ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is used to limit the number of rows returned? (a) setMaxRows(int i) (b) setMinRows(int ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which file separator should be used by MANIFEST file? (a) / (b) \ (c) - (d) // The question was asked ... Java Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which attribute is used to specify initialization method? (a) init (b) init-method (c) initialization (d) ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which attribute is used to specify destroy method? (a) destroy (b) destroy-method (c) destruction (d) destruction- ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not an Enterprise Beans type? (a) Doubleton (b) Singleton (c) Stateful (d) Stateless ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not true about Java beans? (a) Implements java.io.Serializable interface (b) Extends java. ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is correct error when loading JAR file with duplicate name? (a) java.io.NullPointerException ( ... JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is not a feature of Beans? (a) Introspection (b) Events (c) Persistence (d) Serialization ... & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following contains both date and time? (a) java.io.date (b) java.sql.date (c) java.util.date ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is advantage of using PreparedStatement in Java? (a) Slow performance (b) Encourages SQL ... JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which one of the following contains date information? (a) java.sql.TimeStamp (b) java.sql.Time (c) java.io. ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
...