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 jdbc? Describe the steps needed to execute a sql query using jdbc.
What are jdbc and its components?
How to rollback a JDBC transaction?
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 is the return type of execute, executequery and executeupdate?
What is in terms of jdbc a datasource?
Is oracle client required for jdbc connection?
How many categories of jdbc drivers are there?
How can I instantiate and load a new CachedRowSet object from a non-JDBC source?
Briefly tell about the jdbc architecture.
Does sql allow null values ?
What is ojdbc?
What does executeupdate return in jdbc?
If you are given a choice to implement the code to either insert a record or update if already exist, which approach will you follow ?
What are the different types of locking in JDBC?