Explain Java takes care of registering the driver »
By Ramakrishna on Oct 4, 2008 in Java Class Registering | 0 Comments
Q) How Class.forName takes care of registering the drivers?
Rep) (”oracle.jdbc.driver.OracleDriver()”);
The driver vender provides a static block.As part of this block code will be provided to take care of registering the driver.
When Class.forName is executed the class will be loaded and the static block of the class will be executed. The code in the static block [...]
