Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2005

Tip: Looking for answers? Try searching our database.

calling a method of the interface which was not implemented in any class

Thread view: 
Choubey - 03 Mar 2005 08:40 GMT
hi everybody,

  Iam a java programmer actually i want to know how the Connection
object is created through DriverManager.getConnection when
DriverManager class is not implements Connection interface and no class
in java implementas interface connection so how can we get a object
reference for connection object and call a getconnection method through
the connection object. i seen that there are lots of interface in java
which are not implemented on java but we take a reference of thet
interface and we call a method of that interface. how it is possible
coz interface have simple method declaration implementation in the
class which implement this inteface. so plz help me for this problem.
aim waiting for somebodies replay.

thanks
Choubey
Raymond DeCampo - 04 Mar 2005 00:50 GMT
> hi everybody,
>
[quoted text clipped - 9 lines]
> class which implement this inteface. so plz help me for this problem.
> aim waiting for somebodies replay.

The implementations for java.sql.Connection, java.sql.Statement,
java.sql.ResultSet, etc. are usually provided by the JDBC driver.  A
JDBC driver is usually provided by the database vendor, or sometimes via
third parties.

The philosophy behind this mechanism is that by providing interfaces,
the application programmer (you) can write code that uses the interfaces
only.  Then you can load whichever JDBC driver you want at run-time,
without changing your code.

HTH,
Ray

Signature

XML is the programmer's duct tape.

Choubey - 04 Mar 2005 10:20 GMT
hi ray

thank you for your reply.

bye
Dharmendra


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.