Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iimplemenatation classes of Connection,Statement,PrepareStatement,CallabaleStatement?

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1)Where is the implemenatation of Connection,Statement,PrepareStatement,CallabaleStatement?
 
Jeevan Reddy
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is provided in the jdbc jar provided by different vendors oracle, db2 etc.
If you have the software, you can open the jar and see the implementation for them.

Regards,
Jeevan.
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connection con=DriverManager.getConnection();

Q1) From DriverManager class we are Connection object.Do DriverManager class provides implementation of it?
Reason behinng asking this question i was asked interview.Where are implementation classes. If there is interface someone has provide implemntation for
it.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. As Jeevan said, the implementation is provided by the jdbc driver jar.

DriverManager provides a reference to the class, not the implementing class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic