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 does the method Class.forName returns?

Answer Posted / uv

When Class.forName("<classname>") function gets
executed,the class gets loaded in JVM.

To create an object and access its functions and variables,
we can use getInstance( ), please look into the below
fragment code:

Class c = Class.forName("Cls");
Object o = null;
o = c.getInstance( );
// type casting the Object
Cls cl = (Cls) o;

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jdbc? Describe the steps needed to execute a sql query using jdbc.

847


What are jdbc and its components?

920


How to rollback a JDBC transaction?

1028


There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?

993


What is the return type of execute, executequery and executeupdate?

1060


What is in terms of jdbc a datasource?

1008


Is oracle client required for jdbc connection?

914


How many categories of jdbc drivers are there?

849


How can I instantiate and load a new CachedRowSet object from a non-JDBC source?

921


Briefly tell about the jdbc architecture.

930


Does sql allow null values ?

907


What is ojdbc?

897


What does executeupdate return in jdbc?

918


If you are given a choice to implement the code to either insert a record or update if already exist, which approach will you follow ?

934


What are the different types of locking in JDBC?

948