In JDBC, we have to create objects of interfaces like Statement, Connection, ResultSet etc. But I used to know that objects of interfaces aren't possible then how come it's working in JDBC?
Asked
Active
Viewed 32 times
1 Answers
2
You are not doing new Statement()
or something like that.
Someone (the JDBC driver vendor) provides concrete implementations of these interfaces. Those are the ones that get instantiated (not by you, but by the driver code, you just receive them and code to the interface).
That is basically the same with any interface.

Thilo
- 257,207
- 101
- 511
- 656