Hi my doubt is that preparedStatement is a interface means
which has no implemenation.plz go thru the code below
String sql = "SELECT * FROM movies WHERE year_made = ?";
prest = con.prepareStatement(sql);
prest.setInt(1,2002);
ResultSet rs1 = prest.executeQuery();
Now setInt and executeQuery how it works since it is
interface it does not have implementation how it works, how
executeQuery returns result from database as executequery
method has no implementation even in Statement interface.
Answer Posted / arin
just return the resultset rs.Its sufficient.
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What should be done for auto generating primary key id in a table ?
Why do we need jdbc api?
What is a statement in java?
Is jdbc secure?
Can we return resultset in java?
What are the advantages of collection pools?
What happens if connection is not closed in jdbc?
please tell me the name and url path for type-4 driver ?
What is a statement?
How to check jdbc connection in java?
What are the differences between statement and preparedstatement interface?
What is new in JDBC 2.0?
Discuss the procedure of retrieving warnings?
What are the components of jdbc?
Is jdbc a web technology?