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
How would you create a button with rounded edges?
What are the pros and cons of detached objects?
Why do threads block on i/o?
Explain how will the struts know which action class to call when you submit a form?
What is the diffrence between a local-tx-datasource and a xa-datasource?
What is the immediate superclass of the applet class?
How to determine SGA site?
Explain phantom read?
how i secure my site with the https protocol.what are the steps?
What is prototype?
hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me
Is the session factory thread safe?
What is jboss?
what are the advantages of JTA over JTS?
What is TL and its use?