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


Please Help Members By Posting Answers For Below Questions

How we can you use preparedstatement.

555


What are the common JDBC problems that you got and how do you solved them?

1965


Is jpa faster than jdbc?

509


What is db client?

497


What is xe in oracle jdbc url?

544






What is jdbc and explain jdbc architecture?

520


What does connection pooling mean ?

573


What is jdbc and jdbc drivers?

506


What is jdbc odbc bridge in java?

542


Which type of driver provides jdbc access via one or more odbc drivers?

523


What are types of resultset?

561


What are types of jdbc drivers?

524


Explain Basic Steps in Writing a Java Program Using Jdbc?

600


Explain the JDBC Architecture?

570


What is jdbc dialect?

507