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.
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
Please explain my problem
CreateStatement() belongs to which class ???
Connection is a interface & so how can we access it createStatement() on con object?
which concrete class has the implementation for createStatement method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014