whats is mean by class.forName()
whats the return type of class

Answers were Sorted based on User's Feedback



whats is mean by class.forName() whats the return type of class..

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

whats is mean by class.forName() whats the return type of class..

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

whats is mean by class.forName() whats the return type of class..

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

whats is mean by class.forName() whats the return type of class..

Answer / siva

class.forName() is used to load the class at run time.

return type is Class object which represents the class
named by the argument.

Is This Answer Correct ?    2 Yes 0 No

whats is mean by class.forName() whats the return type of class..

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

whats is mean by class.forName() whats the return type of class..

Answer / q

eee

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More Advanced Java Interview Questions

Which component handles cluster communication in jboss?

0 Answers  


What is a clone?

0 Answers  


What is chat area? Explain.

0 Answers  


How would you detect a keypress in a jcombobox?

0 Answers  


For an example, if we have some variable in run method, and we created one or more threads. Does all threads will share the same variable or a copy of variable is created for each thread??

1 Answers  






Which are the different segments of memory?

0 Answers  


What is the use of Class.forName

20 Answers   HCL,


How primary key is implemented in Oracle?

0 Answers  


What is diffennce between AWT & SWING?

4 Answers  


What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference. (Note : Pls ignore syntx errors) public class One { sop ("Into One--"); } public class Two extends One{ sop ("Into Two--"); } public class Home { One a; Two t; public static void main(argv[]) { sop ("In Home--"); sop(One.a); sop(Two.a); sop(One.t); sop(Two.t); } }

2 Answers   Wipro,


what is stringBuffer and StringBuilder?

3 Answers  


What is Stream and Types?

2 Answers   Patni,


Categories