This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes java.sql.Connection ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.sql.Connection ???" Watch "java.sql.Connection ???" New topic

java.sql.Connection ???

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342

Can any one please tell me why java.sql.Connection is a interface ?

And which class implement this Connection interface ?

Thanks & Regards
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Its vendor specific. So the interface is implemented by a class in your JDBC driver.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62594

And therein lies the complete and blinding beauty of interfaces. Despite the fact that each vendor has a unique class that implements the connection, your program doesn't need to care. Isn't that a wonderful thing?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi all,

Lot of thanks for all of your's reply.

Thanks & Regards
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: java.sql.Connection ???