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
Can we return resultset in java?
What is thin driver in jdbc?
What is the latest version of JDBC? What are the new features added in that?
Where is jdbc url mysql?
How do we load the drivers?
What is batch processing and how to perform batch processing in jdbc?
What are the jdbc statements?
How can you load the drivers?
What is encrypted connection?
What are the steps required to execute a query in jdbc?
What are 4 drivers available in JDBC? At what situation are four of the drivers used?
What are the different types of drivers under jdbc?
How do I start debugging problems related to the JDBC API?
What are different types of ResultSet?
Which is better odbc or jdbc?