what is class.forname() and how it will be useful ?

Answer Posted / amit singh

it is useful when you don't know about the class as compile
time you must to use it you pass the class name as a string
and
its a part of reflection api
but you used it when you connect through db
and many more you should do when you don't know the class
at compile time
and also above which mention by pradip right
amitsingh200@gmail.com
amit09mca(scjp 1.5 and manymore)

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is == and === in javascript?

556


How will you invoke any external process in java?

602


What do you mean by of string::valueof expression in java 8?

539


What is a parameter in matrices?

541


How many threads can java run?

559






Write an algorithm for quick sort?

615


How does list work in java?

507


What is final method?

582


What are methods of a class?

542


Why is core java important?

574


What is percentage in java?

569


What is java virtual machine? Explain

570


What is the purpose of using the java bean?

566


What is string :: npos?

581


why not override thread to make a runnable? : Java thread

556