Two Laptop Bag
The moose likes JDBC and Relational Databases and the fly likes which class implements Resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "which class implements Resultset" Watch "which class implements Resultset" New topic

which class implements Resultset

radhika S

Joined: Sep 09, 2007
Posts: 2
Can anyone tell me which class impelments Resultset Interface? I have asked many ppl but couldn't find the answer to it.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

"radhika radhika",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Welcome to the beauty of Interfaces!

We don't immediately know and should not need to know the implementing Class for the interface. The Driver for the Database manages that for us and returns something that behaves like a ResultSet. We treat it like a ResultSet, and regardless of what exists behind the Interface should behave correctly.

You can always find the class using rs.getClass().getName() if you really need to know.
radhika S

Joined: Sep 09, 2007
Posts: 2
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
When you do that ... Looking at the class name, do you think it will be the same for Oracle, UDB, MySQL and every other database?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15101

radhika S - Your name is still not according to the JavaRanch naming policy.

Your second name should not consist of only initials, such as "S". Please use a real-sounding name as your second name.

Please read the naming policy carefully and change your display name again.

Jesper Young - Bartender

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: which class implements Resultset
It's not a secret anymore!