what does the method Class.forName returns?

Answer Posted / m.gangadhar

Example
Class.forName("oracle.jdbc.driver.OracleDriver")

first it loads th class name at run time
second it executes the static initializer containg the code
of driver class i.e
static
{
try{
DriverManager.registerDriver(new Driver());
}
catch(Exception e){}
}

then it creates the object for the driver class and
registers that object in to the DriverManager

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?

508


The new features of the JDBC 2.0 API, will be supported for JDBC-ODBC Bridge?

1668


What is jdbc odbc bridge?

512


What are 4 drivers available in JDBC? At what situation are four of the drivers used?

537


What is jdbc and its types?

502






Does the JDBC-ODBC Bridge work with Microsoft J++?

1874


How to connect multiple database in jdbc?

499


What does it mean to "materialize" data?

525


How can we execute stored procedures using callablestatement?

477


What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?

484


Explain about the drive manager class working?

608


Can I enable requests to a jdbc connection pool for a database connection to wait until a connection is available?

472


What are the standard isolation levels defined by JDBC?

580


Which is faster jdbc or odbc?

506


Explain the role of driver in jdbc.

568