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 are the types of jdbc drivers that exist?

541


What is a jdbc driver and how many jdbc drivers are available?

584


How do I start debugging problems related to the JDBC API?

526


What is the difference between ojdbc6 and ojdbc7?

474


What does the jdbc databasemetadata interface?

526






Discuss the procedure of retrieving warnings?

561


Explain the locking system in jdbc & its types?

508


How to move the cursor in scrollable resultset ?

577


Why we use while rs next ())?

531


What is jdbc and why is it required?

466


Can I get a null resultset?

553


What are the ddl statements?

477


What is difference between statement and preparedstatement in jdbc?

471


What is db client?

497


Why is jdbc needed?

515