what does the method Class.forName returns?

Answer Posted / priyank jain

Static method Class.forName(String className) returns the
Object for the classname specified in argument passed to
method.
Also Class.forName used to load drivers.
Ex. In JDBC call
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
automatically creates an instance of a EmbeddedDriver and
registers it with the DriverManager.

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why hibernate is better than jdbc?

503


What is ODBC and JDBC? How do you connect the Database?

539


What are collection pools?

521


What is two-phase commit in the database?

525


What are the considerations for deciding on transaction boundaries?

560






Explain the difference between resultset and rowset in jdbc

535


Which is best database for java?

526


How can I manage special characters when I execute an insert query?

520


What are the utilities of the callablestatement?

520


What are the jdbc drivers in java?

525


What is savepoint in jdbc?

516


Is uri the same as url?

498


Where is jdbc url mysql?

500


In which ways is driver class is registered with drive manager?

529


How can we set null value in jdbc preparedstatement?

528