whats is mean by class.forName()
whats the return type of class
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shic kumar
class.forName() is used to load the class at run time that
is also called dynamic loading
this mehod is also used to load the driver for database
connectivity like
class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
here this method is used for loadig jdbcodbc driver
Is This Answer Correct ? | 16 Yes | 5 No |
Answer / garima
Class.forName() is other way to create an object other
than new.This Returns class object assosiated with class or
interface with specified name.For example,
Class t=Class.forName("java.lang.Thread");return runtime
class descriptor for class named java.lang.Thread
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / uday
Class.forName() is other way to initialize the object .and
it returns the java.lang.Class
Is This Answer Correct ? | 4 Yes | 6 No |
what are memory considerations of jsp compares to other web components?
What is servlet preinitialization?
whats is statement and procedure
What is the difference between java class and bean?
Is System.err.println(""Statement"); is execute the output on console . Example: System.err.println("Hello JAVA");
What is a session? Can you share a session object between different theads?
What are different types of layout managers in java.awt package?
whats is mean by filter?
What is preemptive and Non-preemptive Time Scheduling?
what is meant by JRMP?
If I define a method in JSP scriplet <%..%>, where will it go after translation into a servlet?
Which characters may be used as the second character of an identifier, but not as the first character of an identifier?