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
when A client sent a request to the server to open facebook page and close the browser after this request .at that time the same user do login by using a different browser then that session id will exist or not for the same client??
Can constructors be synchronized in java?
What is the purpose of the notifyall() method?
Explain ioc concept?
Can I map more than one table in a cmp?
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?
What is a class loader?
What restrictions are placed on the location of a package statement within a source code file?
Name three subclasses of the component class?
What is colon_pkg_prefixes and what is its use?
What are the difference between RMI and CORBA?
whats is mean by tiles in struts
Is the session factory thread safe?
Explain the different types of memory used by jvm?
To what value is a variable of the string type automatically initialized?