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 are dml and ddl?
Explain about the drive manager class working?
There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?
What are four types of JDBC driver?
Can I use JDBC to execute non-standard features that my DBMS provides?
What is ojdbc14 jar?
Briefly tell about the jdbc architecture.
What is metadata in jdbc?
What is executequery in java?
What is the difference between setmaxrows(int) and setfetchsize(int)?
How do I check in my code whether a maximum limit of database connections have been reached?
What is the query used to display all tables names in SQL Server (Query analyzer)?
Discuss the significances of jdbc.
What is ojvm used for?
How does jdbc driver work?