what exactly happens when we execute
"Class.forname("Driver class name");"?Explain indetail
Answer Posted / sudhakar
By the end of the execution of Class.forName("Driver
class"); the driver class should be loaded into the memory
but also
1. The driver class should be initialized
2. Should be registered with the driver manager class
The above two operations are not done by forName() . So a
pure Static() block is defined in which the above two tasks
are manipulated and by which we are able to get connection,
immediately after loading the driver class without writing
any code to initialize the driver class.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How can we maintain the integrity of a database by using jdbc?
What is DML?
What is JDBC Batch Processing and what are it’s benefits?
What is JDBC Statement?
Why would you use setautocommit(false) in jdbc?
What are the different types of resultset?
How can we store and retrieve images from the database?
Name the new features added in jdbc 4.0.
What is ojvm used for?
What are the different types of statements in jdbc?
What are the advantages of using preparedstatement in java?
What are collection pools?
Is jdbc connection secure?
Is possible to open a connection to a database with exclusive mode with JDBC?
Where is ojdbc14 jar located?