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 are the common jdbc exceptions?
What is jdbc oracle thin?
What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?
How to make updates to updatable result sets in jdbc?
Why do we need jdbc?
What is a connection string used for?
How can you know about drivers and database information ?
What is database deadlock ?
Does sql allow null values ? Can we use it within where clause ?
What are four types of JDBC driver?
What is jdbc driver for sql server?
What is an escape syntax?
Why is jdbc used?
What does the jdbc connection interface?
How to connect html page to database using jdbc?