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 does jdbc setmaxrows method do?

510


Describe how the jdbc application works.

516


How do I receive a ResultSet from a stored procedure?

513


Explain the necessary steps to connect to the database in java?

543


What is jdbc servlet?

484






How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?

581


What is jdbc connection string?

499


What are the ddl statements?

462


Is it possible to connect to multiple databases simultaneously? Using single statement can one update or extract data from multiple databases?

514


How you restrict a user to cut and paste from the html page using java programing?

468


What are clob and blob data types in jdbc?

555


What is in terms of jdbc a datasource?

508


What is difference between jdbc and odbc?

479


How do I find whether a parameter exists in the request object?

484


Does jdbctemplate use prepared statements?

501