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.

for example: oracle
all the methods implemented in OracleStatement class.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of statement in jdbc?

466


How does a file store compare with a jdbc store?

631


What is the benefit of having jdbcrowset implementation?

531


State the different connection methods used for creating different types of sql.

494


What is jdbc and odbc in java?

488






What causes the "No suitable driver" error?

532


How to insert an image or raw data into database?

550


What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?

474


Differentiate between type_scroll_insensitive and type_scroll_sensitive.

518


How does jdbc work?

494


What is ojdbc?

526


What is phantom read and which isolation level prevents it?

498


Why isn't the java.sql.DriverManager class being found?

562


What is difference between java.util.Date and java.sql.Date?

531


what happen if we set JDBC string to NULL?

2941