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 to retrieve warnings in jdbc?
What are the flow statements of jdbc?
What is ojdbc?
What are the steps required to execute a query in jdbc?
What is the benefit of having jdbcrowset implementation?
What is ODBC and JDBC? How do you connect the Database?
Describe how the jdbc application works.
What is resultset in jdbc with example?
What is jdbc in java?
What is drivermanager in java?
In which ways is driver class is registered with drive manager?
Explain the difference between inner and outer join ?
What is @entity in java?
What class.forname does, while loading the drivers?
Why do we use jdbc?