If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Resultset implementation

What you are getting is an object of a class (unknown to you) that
implements the ResultSet interface. You can find out what class it actually
is by examining rs.getClass().

This use of interfaces shouldn't be surprising, because it's the main reason
that interfaces exist in Java.

KNR <kanicheril@yahoo.com> wrote in message news:39510117$1@news.devx.com...
>
> While learning JDBC, I found the Resultset is an
> interface. Yet we can use its function like rs.next().
>
> How is this possible?
>
> I am aware when you execute a statement it returns a resultset
> object. But how is a Resultset object created, when there
> is no Resultset class?
>
> thanks,
>
> KNR

Re: Resultset implementation

This is the magic of Multiple inheritence!!!!

"KNR" <kanicheril@yahoo.com> wrote:
>
>While learning JDBC, I found the Resultset is an
>interface. Yet we can use its function like rs.next().
>
>How is this possible?
>
>I am aware when you execute a statement it returns a resultset
>object. But how is a Resultset object created, when there
>is no Resultset class?
>
>thanks,
>
>KNR