A question on interfaces and definitions in JDBC
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Arnab_Nandi
Posted On:   Tuesday, July 17, 2001 08:50 PM

If java.sql.ResultSet is an interface, who provides the definitions of the methods in the interface? For that matter, any of the most commonly used functionalities in the java.sql package are interfaces, like CallableStatement, PreparedStatement, etc. So, when we use a method of these interfaces, where is the code for the method defined?

Re: A question on interfaces and definitions in JDBC

Posted By:   Aron_Tunzi  
Posted On:   Wednesday, July 18, 2001 01:09 AM

The sql interfaces will be implemented in the driver. If you have the oracle's driver (classes12.jar or classes12.zip) you can see that there are interfaces that extend the java.sql.* interfaces and classes that implement the defined interfaces.

Bye Aron

Re: A question on interfaces and definitions in JDBC

Posted By:   Anonymous  
Posted On:   Tuesday, July 17, 2001 10:31 PM

The driver. As always, something must eventually implement an interface. This is a FAQ question and also mentioned in my on-line course. As I say there, this is the reason that one can compile successfully and get errors at runtime -- you compile against the interface, but are at the runtime mercy of the capabilities of the specific driver.
About | Sitemap | Contact