Answer Posted / raghavendra desai
when the Class.forName("oracle.jdbc.driver.OracleDriver) is
executed, the driver calss will be loaded if it was not
loaded earlier. As soon as the class is loaded the static
block will be executed. In the static block the JDBC driver
vendors are responsible for providing the static block in
the driver class. In static block they would have been
written the similar kind of code.
public class oracle.jdbc.driver.OracleDriver implements
Driver
{
static
{
Driver drv= new oracle.jdbc.driver.OracleDriver();
DriverManager.registerDriver(drv)
-----
-----
some other code
}
}
Is This Answer Correct ? | 36 Yes | 3 No |
Post New Answer View All Answers
the same information whether it will connect to the database or it will be used previous information?
Explain what is synchronization?
In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?
What are the services in RMI ?
Write a singleton program?
Java is fully object oriented languages or not?
What class is the top of the awt event hierarchy?
How primary key is implemented in Oracle?
What are the pros and cons of detached objects?
Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
Write a program to show synchronization?
What restrictions are placed on the values of each case of a switch statement?
Is it possible to stop the execution of a method before completion in a sessionbean?
whats is statement and procedure
Difference between loadclass and class.forname?