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
Give an example of code used for setting up connection with a driver.
What is database deadlock ? How can we avoid them?
How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
What is the difference between jdbc and odbc?
How do I stop nullpointerexception?
What are the jdbc statements?
What does the jdbc driver interface do?
Is jdbc a framework?
What does the jdbc databasemetadata interface?
Which jdbc drivers will run your program?
What are types of resultset?
RowSetInternal caller and returns void. What can I do in the readData method?
What are the classes and methods used for sending sql statements to database?
Where is jdbc used?
What is meant by dao?