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?

493


Why jdbc is used in java?

475


What are the different types of drivers under jdbc?

467


What are the steps required to execute a query in jdbc?

524


What are the differences between stored procedure and functions?

466






What is ojdbc14 jar?

490


How data can be inserted into long row column of database?

1698


Why we use while rs next ())?

520


Is jdbc faster than hibernate?

565


What should be done for auto generating primary key id in a table ?

519


How many packages are available in jdbc api?

535


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

508


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

528


What do you mean by database connection pooling?

508


What are the differences between execute, executequery, and executeupdate?

481