473,473 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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

Jul 17 '05 #1
2 4649
Choubey wrote:
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.


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

--
XML is the programmer's duct tape.
Jul 17 '05 #2
hi ray

thank you for your reply.
bye
Dharmendra

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Martin Maney | last post by:
I've been to the cookbook (both forms, since they're sometimes usefully different), but that gave rise to more questions than answers. Heck, let me pull some of them up while I'm at it. ...
17
by: Medi Montaseri | last post by:
Hi, Given a collection of similar but not exact entities (or products) Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern to provide a common interface to these products....
3
by: Jarmo Muukka | last post by:
Hello, I have an interface which has a method which returns an interface. I would like to return a real type in implemented class. interface IFoo { .... }
7
by: Christopher Wells | last post by:
There's something I don't understand about how the CollectionBase class is defined. I can declare: class Derived : CollectionBase { } I can instantiate this Derived class: Derived derived...
5
by: Keith Patrick | last post by:
Could someone tell me if it's possible (and if so, how) to call an explicitly-implemented interface method from a subclass? I have a class in which I have to explicity implement some methods, but...
1
by: Dominic via DotNetMonster.com | last post by:
I am a CA-OpenROAD programmer, but I attempting to build some VB.NET DLLs and access them through OpenROAD as an external Windows TypeLib. I have managed to build a simple DLL (code follows) but...
2
by: Kevin Frey | last post by:
In a derived class I am trying to redefine the implementation of a interface method defined in a base class - the base class interface method was not declared virtual. I have yet to actually...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
6
by: Ole Nielsby | last post by:
VC has a __cdecl specifier which allows functions and methods to be called with varying parameter count. (I understand this is the default for functions in general but in VC, instances use...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.