How do I implement the interfaces Statement and PreparedStatement?
These SQL package interfaces are declared in the Java API so that your applications do not have to rely on a single specific implementation. The JDBC scheme requires database vendors to provide concrete implementations of these interfaces, and these are obtained via the DriverManager class. When the database driver is registered, the DriverManager accessor methods return database-specific implementations of Driver and Connection, which issue custom Statement, PreparedStatement and ResultSet instances in turn. Actions: Follow-up, clarify or correct this answer. Submit a new question.
Related Questions
- A class inherits from 2 interfaces and both the interfaces have the same method name as shown below. How should the class implement the drive method for both Car and Bus interface?
- Why don’t Berkeley DB and Berkeley DB Java Edition both implement a shared set of Java interfaces for the API? Why are these two similar APIs in different Java packages?
- How do I implement the interfaces Statement and PreparedStatement?