when we write class.forName("any one class"); what happens
actually?what it will return?explain stepwise?
Answer Posted / paras
Class.forName("")loads that class in memory ,to create
instance we have to use newInstance()
string _path="classpath loc of class XYZ ex com.aa.ss.XYZ";
Object ob=Class.forName(_path).newInstance();;
((XYZ)ob).any_method_of_XYZ();
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Define jit compiler?
What are the two types of java programming?
What are the differences between processes and threads?
Give us a program to check for parenthesis matching using stack.
Can inner class final?
What is __ init __ functions?
What is a map? What are the implementations of map?
Differentiate between stringbuffer and stringbuilder in java.
Is null in java?
What do you mean by synchronized non access modifier?
What is the use of jtable?
How to sort array in descending order in java?
What are the steps involved to write rmi based programs?
Define reflection.
What is meant by null and void?