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 isolation level is used by the DBMS when inserting, updating and selecting rows from a database?

921


Which is faster jdbc or odbc?

846


What is odbc and jdbc drivers?

900


Write an sql to find all records having all numeric characters in a field ?

909


Is jdbc a protocol?

880


How can we execute stored procedures using callablestatement?

886


What are the steps to connect to a database in java?

885


What are the methods which can verify the cursor particular position?

953


What are the considerations for deciding on transaction boundaries?

949


How can I write to the log used by DriverManager and JDBC drivers?

950


Prepared statements are faster. Why?

1001


What are clob and blob data types in jdbc?

988


What driver should I use for scalable Oracle JDBC applications?

929


How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?

1017


Explain the locking system in jdbc & its types?

904