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 ?");


Answers were Sorted based on User's Feedback



Statement, PrepareStatement and Callable all these are interfaces. Thought it is a interface how c..

Answer / 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

Statement, PrepareStatement and Callable all these are interfaces. Thought it is a interface how c..

Answer / brahma

Driver vendor provides implementation classes for these
interfaces.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JDBC Interview Questions

How many locking systems are there in jdbc?

0 Answers  


What is JDBC Connection? Explain steps to get Database connection in a simple java program.

0 Answers  


How a database driver can be loaded with jdbc 4.0 / java 6?

0 Answers  


what are the types of result sets in JDBC 3.0 ?

3 Answers   HCL,


How can you tune SQL statements?

2 Answers   Wipro,






Why should we close database connections in java?

0 Answers  


i have 1000 records in resultset, how to get first 100 records from resultset, because resultset fetch all 1000 records at a time?

8 Answers   HSBC,


PreparedStatement is a pre compiled statement but where it's pre compiled ?

4 Answers  


What is getconnection method in java?

0 Answers  


Explain the life cycle of jdbc.

0 Answers  


How many types of jdbc drivers are available?

0 Answers  


What are the ddl statements?

0 Answers  


Categories