Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.Connection ???

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

And which class implement this Connection interface ?

Thanks & Regards
Bikash
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its vendor specific. So the interface is implemented by a class in your JDBC driver.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Lot of thanks for all of your's reply.

Thanks & Regards
Bikash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic