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

How can I avoid validating a form before data is entered?

985


What are various types of class loaders used by jvm?

973


How task's priority is used in scheduling?

2283


What is threadfactory?

1074


What class is used to create Server side object ?

2223


What is the difference between a static and a non-static inner class?

1129


What is the difference between the font and fontmetrics classes?

1130


Explain what is orm?

1083


What is the difference between system.out ,system.err and system.in?

1084


Can constructors be synchronized in java?

1101


Explain how will the struts know which action class to call when you submit a form?

945


What is the relationship between local interfaces and container-managed relationships?

1101


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

1034


Define the remote object implementation?

2484


Difference between DurableSubscription and non- DurableSubscription?

2174