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
What is execute in java?
What are the common JDBC problems that you got and how do you solved them?
What is ojvm used for?
How can we execute stored procedures using callablestatement?
Can we return resultset in java?
How do java applications access the database using jdbc?
What is the meaning of batch updates?
What is database deadlock ? How can we avoid them?
Give steps to connect to the db using jdbc?
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?
What is resultset?
What is difference between jdbc and odbc?
What is JDBC Driver interface?
Is jdbc a protocol?
How to use JDBC API to call Stored Procedures?