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 does module-relative mean?
What is chat area? Explain.
When a thread blocks on i/o, what state does it enter?
Why is string immutable in java?
Explain ioc concept?
What is threadfactory?
What is in-memory replication?
Do I need to import javlang package any time? Why ?
What is prototype?
What value does read() return when it has reached the end of a file?
Write a singleton program?
Why doesn’t the focus feature on the tag work in every circumstance?
Which containers use a border layout as their default layout?
wahts is mean by dynavalidatorform in struts/
What must a class do to implement an interface?