What is the use of Class.forName
Answers were Sorted based on User's Feedback
Answer / rajshekhar
class.forName() is used to load the jdbc driver.
class is a class and for name is a static method its syntax
is
Class.forName("sun.jdbc:odbc:JdbcOdbcDriver");
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / amol sawant
Class.forName(driver);
in this "Class" is the name of the Object of "Class" class
which is in sql package
and forName();
is method of that class "Class"
it will load the driver for connection purpose
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ramaiah raj
Class.forName(String ClassName); Here Class is Predefined
class.forName(String className) is method used to create the
object which declared as abstract. In JDBC the Driver class
is an abstract class. So in order to create a instance
forName method is used.
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / bhagya raju vallabhapuram
loads the class into jvm's memory with out creating the object
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / poonam verma
It loads class once and execute static block.
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / ambika
it is used to load the driver in database
its a first step of connection of database
structure:
class.forName("sun.jdbc:odbc:jdbcodbcDriver")
Is This Answer Correct ? | 12 Yes | 18 No |
Answer / devarathnam c,kotagudibanda(po
Hi...
Class.forName();method facilitates you to loading the
driver inorder to providing the connection between the
forntend and backend for database transactions.
Is This Answer Correct ? | 2 Yes | 15 No |
Answer / nk
The class.forname provides a mechanism to define driver at
run time.
Is This Answer Correct ? | 8 Yes | 23 No |
Answer / gopalramana
class.forName("abc.class")
loads ths class and create instance in JVM.
Is This Answer Correct ? | 2 Yes | 20 No |
Explain the purposes of methods wait(), notify(), notifyAll ()?
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); } }
What is ioc concept?
What method is invoked to cause an object to begin executing as a separate thread?
What is the difference between RMI and Corba?
Explain the advantages and disadvantages of detached objects.
whats is mean by connectionpooling
what is handle?
what are design patterns in java?give with example?
Hi I have joined java course. I also want additional help from any tutorials website. Please suggest me tutorials which provides easy to understand online applet tutorials?
What is Servlet Filter And What does it work?
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?