File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
Connection is interface so how can we access it createStatement() on connection objec
Joined: Dec 26, 2007
Jan 25, 2008 08:56:00
But Connection is a interface & so how can we access it
Statement st = con.createStatement();
Creates a Statement object for sending SQL statements to the database
ReturnType of createStatement() is Statement
Joined: Nov 19, 2002
Jan 25, 2008 11:40:00
belongs in Beginner's forum.
Connection is an interface, but DriverManager.getConnection() returns an object which implements this interface. Interface is only telling you what methods that implementation object will have.
author & internet detective
Joined: May 26, 2003
Jan 25, 2008 16:36:00
Please don't post the same question in multiple forums. It makes answers harder to follow and wastes people's time answering the same question. I'll close this copy and we can continue discussion in the
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Connection is interface so how can we access it createStatement() on connection objec
CreateStatement() belongs to which class ???
which concrete class has the implementation for createStatement method
Please explain my problem
Connection is a interface & so how can we access it createStatement() on con object?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014