File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection Interface

 
shyam java developer
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why in JDBC Connection is interface?
 
Vijay Tidake
Ranch Hand
Posts: 146
Hibernate Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Its because of each DB is vendor specific.So the class that provides you a connection object implements the Connection interface(Polymorphism).

Connection con=DriverManager.getConnection(<params>);

DriverManager.getConnection(<params>); return the object of a class(the name of a class does not matter) that implements the Connection interface

Hope this helps
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic