when we write class.forName("any one class"); what happens
actually?what it will return?explain stepwise?

Answer Posted / raghu

When Class.forNmae("className") is executed, the class will
be loaded, as soon as the class is loaded the static block
will be executed.In the static block the thngs will happen.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by data hiding/encapsulation?

579


What are local variables?

604


What is the use of join method?

583


How do you check if an arraylist is not empty?

583


Can a variable be local and static at the same time?

556






What is the difference between @before and @beforeclass annotation?

549


What is variable explain?

536


What is difference between protected and private?

538


What is the role of the java.rmi.naming class?

536


What is the java project architecture?

1795


What is comparator in java?

567


What are exceptions

651


Why is the singleton pattern considered to be an anti pattern?

484


What is 32 bit float?

567


What is passing parameters in java?

533