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
How do I set properties for a JDBC driver and where are the properties stored?
Jdbc-odbc bridge is multi-threaded or not?
What class.forname will do while loading drivers of jdbc?
How do I insert/update records with some of the columns having NULL value?
If I use the JDBC API, do I have to use ODBC underneath?
Where is ojdbc14 jar located?
What packages are used by jdbc?
What is odbc. how is it related to sql cli?
What do you understand by DDL and DML statements?
What are the types of statements in jdbc?
What is a jdbc url?
What is resultset?
What is JDBC Transaction Management and why do we need it?
How to check jdbc driver version in websphere?
What is meant by jdbc?