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 should be done for auto generating primary key id in a table ?

912


Why do we need jdbc api?

910


What is a statement in java?

852


Is jdbc secure?

914


Can we return resultset in java?

867


What are the advantages of collection pools?

970


What happens if connection is not closed in jdbc?

906


please tell me the name and url path for type-4 driver ?

3091


What is a statement?

961


How to check jdbc connection in java?

879


What are the differences between statement and preparedstatement interface?

927


What is new in JDBC 2.0?

949


Discuss the procedure of retrieving warnings?

925


What are the components of jdbc?

938


Is jdbc a web technology?

845