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 is an escape syntax?
What are the different types of JDBC drivers?
What is jdbc class forname?
What are the new features added to JDBC 4.0?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
Is jdbc a web technology?
What are database warnings in jdbc and how can we handle database warnings in jdbc?
What are clob and blob data types in jdbc?
What are the different types of statements in jdbc?
Which type of driver is unique in jdbc?
Explain different types of locks in jdbc?
What is thin driver in jdbc?
What is jdbc and its types?
What is the use of JDBC DriverManager class?
What is SQL Warning? How to retrieve SQL warnings in the JDBC program?