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 jdbc and odbc?
Explain about column name and getter method?
What protocol does jdbc use?
What is phantom read and which isolation level prevents it?
How are jdbc statements used?
Which type of driver is unique in jdbc?
What are the different types of statements? How we can you use preparedstatement.
What are restrictions on triggers?
What should be done for auto generating primary key id in a table ?
What does the jdbc resultset interface?
How can we set null value in jdbc preparedstatement?
What is the function of drivermanager class?
Differentiate between stored procedure and functions?
What is executequery in java?
What is JDBC Batch Processing and what are it’s benefits?