Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What does executeupdate return in jdbc?

956


What is the role of class.forname while loading drivers?

990


How do we load the drivers?

982


Why do we need jdbc?

1037


Compare jdbc and odbc and how is jdbc required in this context.

920


What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?

942


What are the measures to connect to the db using jdbc?

1011


How do you insert images into database using jdbc?

1056


What is jdbc odbc bridge?

933


Why do we use jdbc in java?

1021


Describe the steps needed to execute a sql query using jdbc.

962


How to move the cursor in scrollable resultset ?

1022


How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?

1062


Give a way to check that all result sets have bin accessed and update counts are generated by execute method.

930


What is JDBC Savepoint? How to use it?

1187