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
Is the session factory thread safe?
What are the difference between RMI and CORBA?
What is a policy?
What is the relationship between local interfaces and container-managed relationships?
Is it possible to stop the execution of a method before completion in a sessionbean?
How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!
What is the map interface?
whats is mean by tiles in struts
What’s jboss jbpm?
Do we need to override service() method
What is TL and its use?
What is the diffrence between a local-tx-datasource and a xa-datasource?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
what are the activation groupworks?
What is RMI and what are the services in RMI?