Answer Posted / amit beriwal
forName
public static Class forName(String className)
throws ClassNotFoundException
Returns the Class object associated with the class or
interface with the given string name. Invoking this method
is equivalent to:
Class.forName(className, true, currentLoader)
where currentLoader denotes the defining class loader of
the current class.
For example, the following code fragment returns the
runtime Class descriptor for the class named java.lang.Thread:
Class t = Class.forName("java.lang.Thread")
A call to forName("X") causes the class named X to be
initialized.
Parameters:
className - the fully qualified name of the desired
class.
Returns:
the Class object for the class with the specified name.
Throws:
LinkageError - if the linkage fails
ExceptionInInitializerError - if the initialization
provoked by this method fails
ClassNotFoundException - if the class cannot be located
Source:-http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#forName%28java.lang.String%29
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What’s jboss jbpm?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
What are the diff types of exception?
which type of objects reference will be given to client?
what is the use of State Factories?
What is ripple effect?
What are the benefits of detached objects?
What is the purpose of the notify() method?
What is the relationship between local interfaces and container-managed relationships?
How database connectivity in XML is achieved?
Why won’t the jvm terminate when I close all the application windows?
Is the infobus client side only?
Why do I get a duplicate name error when loading a jar file?
How are the elements of a cardlayout organized?
What is an abstract method?