What is the use of Class.forName

Answer Posted / vivek katta

Class.forName will basically load a class. As part of class loading, static variables
will be initialized and static blocks present in the class will be executed.

This is the concept used in JDBC to register driver(s). A static block in the driver
class gets executed which inturn registers the JDBC driver with the connection
manager.

Is This Answer Correct ?    66 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about RMI Architecture?

612


What is the difference between RMI and Corba?

2268


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

552


What is a session? Can you share a session object between different theads?

558


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1646






What are the call back methods in entity bean?

566


Which javutil classes and interfaces support event handling?

587


What’s jboss jbpm?

586


What is the relationship between an event-listener interface and an event-adapter class?

557


Which textcomponent method is used to set a textcomponent to the read-only state?

638


What is chat area? Explain.

560


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

1785


How task's priority is used in scheduling?

1786


What are the different class loaders used by jvm?

604


In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?

1564