This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
The interfaces like COnnection,Statement,Prepared Statement,ResultSet etc should hava an implementation class.Can anyone please tell me which is the class that implements these interfaces Thanks in advance
"tomas", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp. We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements. Thanks. Dave
JDBC does things a little differently, in that it tries to hide these details so that you never know them. The advantage is that if only know the generic behaviour of a Class and not its specifics, you can swap in any Class that behaves the same way. This reduces coupling with a single database since (in theory) you should be able to swap directly to another one. The reality is a little different. That is why you will generally see code like this:
The only 'concrete' class is the DriverManager. Each database Driver should register itself with the manager (this happens in the 'forName' bit) The DriverManager hands back a specific class type, but you only know it is a 'Connection'. Dave [ September 03, 2002: Message edited by: David O'Meara ]