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
What is the purpose of the wait(), notify(), and notifyall() methods?
Why is actionform a base class rather than an interface?
Explain the advantages and disadvantages of detached objects.
What is the difference between the font and fontmetrics classes?
Can I map more than one table in a cmp?
What is the infobus?
What is the purpose of the notifyall() method?
What is a clone?
What is the difference between long.class and long.type?
What are the sequence of steps to write pub or sub model kind of application?
How is a java object message delivered to a non-java client?
What are various types of class loaders used by jvm?
Difference between new operator and class.forname().newinstance()?
What you mean by COM and DCOM?
What is the purpose of the wait() method?