Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the use of Class.forName

Answer Posted / raghavendra desai

when the Class.forName("oracle.jdbc.driver.OracleDriver) is
executed, the driver calss will be loaded if it was not
loaded earlier. As soon as the class is loaded the static
block will be executed. In the static block the JDBC driver
vendors are responsible for providing the static block in
the driver class. In static block they would have been
written the similar kind of code.

public class oracle.jdbc.driver.OracleDriver implements
Driver
{
static
{
Driver drv= new oracle.jdbc.driver.OracleDriver();
DriverManager.registerDriver(drv)
-----
-----
some other code

}
}

Is This Answer Correct ?    36 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the wait(), notify(), and notifyall() methods?

975


Why is actionform a base class rather than an interface?

1005


Explain the advantages and disadvantages of detached objects.

968


What is the difference between the font and fontmetrics classes?

1085


Can I map more than one table in a cmp?

1033


What is the infobus?

1038


What is the purpose of the notifyall() method?

991


What is a clone?

1006


What is the difference between long.class and long.type?

1005


What are the sequence of steps to write pub or sub model kind of application?

2456


How is a java object message delivered to a non-java client?

999


What are various types of class loaders used by jvm?

934


Difference between new operator and class.forname().newinstance()?

1087


What you mean by COM and DCOM?

1020


What is the purpose of the wait() method?

1110