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
Result set’s index starts with 0 or 1?
Does jdbctemplate use prepared statements?
How do you insert images into database using jdbc?
What are the steps to connect to the database in java?
Why do you use a data source object for a connection?
How many types of jdbc drivers are there?
How MS-Access DB can be accessed over a network, using JDBC API?
What is jdbc vs odbc?
Explain the locking system in jdbc?
How do I insert an image file (or other raw data) into a database?
What is the meaning of connection?
What are the three parts of a jdbc url?
What are the components of jdbc?
How can I manage special characters when I execute an insert query?
How many jdbc driver types are there?