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
How to test jdbc connection to sql server?
Why jdbc is used in java?
What is database connection pooling? Advantages of using a connection pool?
What is jdbc odbc bridge in java?
How the JDBC application works?
What is jdbc driver?
What is the purpose of jdbc resultset interface?
What is a statement in java?
How vendor Naming registry supports JNDI?
What is a jdbc connection?
What is jdbc and jpa?
What is connection data?
What are the basic exceptions in jdbc?
What is jdbc stand for?
What is the different between ResultSet and RowSet?