• 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
Sheriff
Posts: 36027
430
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.
 
I'm still in control here. LOOK at this tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!