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

password, is stored in as plain text. What can I do to protect my passwords?

513


What class.forname will do while loading drivers of jdbc?

492


What is statement and preparedstatement in java?

490


What is jdbc thin client in oracle?

490


How can I write to the log used by DriverManager and JDBC drivers?

514






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

543


How we store procedure in oralce for callable statements in jdbc

1841


Why resultset is used in java?

500


What are database warnings in jdbc and how can we handle database warnings in jdbc?

609


Which database is used for java?

523


What is an odbc driver?

481


How you restrict a user to cut and paste from the html page using java programing?

473


Why do I have to reaccess the database for Array, Blob, and Clob data?

542


What is a statement?

574


Can I get a null resultset?

544