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 database connection pooling? Advantages of using a connection pool?

542


please tell me the name and url path for type-4 driver ?

2476


How to connect multiple database in jdbc?

494


How many locking systems are there in jdbc?

559


What do you understand by DDL and DML statements?

508






Explain the difference between inner and outer join ?

514


Can resultset be null in java?

510


What is 2 phase commit?

565


What are different parts of a url?

506


Give an example for execution of sql statement.

530


What is statement and resultset in jdbc?

496


What are restrictions on triggers?

1676


How do I stop nullpointerexception?

514


Why should we close database connections in java?

687


Which is best database for java?

523