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
What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?
Which is faster jdbc or odbc?
What is odbc and jdbc drivers?
Write an sql to find all records having all numeric characters in a field ?
Is jdbc a protocol?
How can we execute stored procedures using callablestatement?
What are the steps to connect to a database in java?
What are the methods which can verify the cursor particular position?
What are the considerations for deciding on transaction boundaries?
How can I write to the log used by DriverManager and JDBC drivers?
Prepared statements are faster. Why?
What are clob and blob data types in jdbc?
What driver should I use for scalable Oracle JDBC applications?
How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?
Explain the locking system in jdbc & its types?