Connection Object
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jayaramu_DS
Posted On:   Thursday, March 22, 2001 02:15 AM

Hi,

First thing is i don't want this question to be hosted in jguru.com

My question is DriverManager.getConnection() method returns object of Connection interface. But DriverManager class doesn't implement Connection interface. Then how is it possible?

Connection Object

Posted By:   Rohit_Gupta  
Posted On:   Tuesday, March 27, 2001 04:46 PM

the excact statement is

Connection con = DriverManager.getConnection("String url, String user, String password);

DiverManager class in turn make a connection with the url for you, and return a connection object, if it is sucessfull.

Re: Connection Object

Posted By:   accuser_mentor  
Posted On:   Thursday, March 22, 2001 03:55 AM

We are using the Class.forName option which is calling the necessary class from the com.sun package given by the jdk for establishing the database conectivity. So this method calls a class which actaully implements the Connection Interface.
About | Sitemap | Contact