whats is mean by class.forName()
whats the return type of class
Answer Posted / jaspal
Class.forName() method is used to load the class in a memory
at runtime. Assume we have a class - aa.bb.DemoClass, then
the method looks like:
Class.forName("aa.bb.DemoClass");
Its return type is a Class object, i.e.
Class classObject = Class.forName("aa.bb.DemoClass");
Now, to create an instance of this class, use
Object object = classObject.newInstance();
Is This Answer Correct ? | 26 Yes | 0 No |
Post New Answer View All Answers
What does module-relative mean?
Are there books about seam?
cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..
How database connectivity in XML is achieved?
What are the different types of exception?
What is the difference between ear, jar and war file?
Which class is the immediate superclass of the menucomponent class?
In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?
What are externizable interface?
What is Stream Tokenizer?
What is the difference between the string and stringbuffer classes?
What is prototype?
Describe activation process?
What is difference between object state and behavior?
What is ioc concept?