Statement, PrepareStatement and Callable all these are
interfaces. Thought it is a interface how come we are
creating objects and calling methods("preparestatement()")
in it. In which class this method is defined.
Please let me know. Thanks in advance.

example:
PreparedStatement pre = con.prepareStatement(
"UPDATE COFFEES SET SALES = ? WHERE COF_NAME LIKE ?");


Answer Posted / brahma

Driver vendor provides implementation classes for these
interfaces.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ojvm used for?

552


What is the difference between executing, executequery, executeupdate in jdbc?

563


Explain what should be done when a SQL exception is raised?

554


Give steps to connect to the db using jdbc?

589


What is type 4 jdbc driver?

484






What are the benefits of PreparedStatement over Statement?

529


What is CLOB and BLOB datatypes in JDBC?

559


Where is jdbc used?

490


What is resultsetmetadata?

506


what happen if we set JDBC string to NULL?

2951


What are jdbc?

548


What is jdbc and jdbc drivers?

506


What should be done for auto generating primary key id in a table ?

529


What is JDBC Transaction Management and why do we need it?

549


When do we get java.sql.SQLException: No suitable driver found?

548