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
int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!
What does module-relative mean?
What are the design considerations while making a choice between using interface and abstract class?
What are the services in RMI ?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
Can you give me a simple example of using the requiredif validator rule?
Write a program to show synchronization?
What is the difference between RMI registry and OS Agent?
What is ioc concept?
How are the elements of a borderlayout organized?
What class is used to create Server side object ?
What is a modular application?
Can we sent objects using Sockets?
What is a tasks priority and how is it used in scheduling?
What is the difference between session and entity beans?