Interface confusion

suppose

interface first

{void show(); }

interface second extends first

{ void show();}

here both inteface have same methods signature

now

class Test implements seconds

{

code..

}

Now

what i want to do is to define the code for show() declared in second

can any one suggest me

[365 byte] By [Neeraj@Raipura] at [2007-11-27 11:14:08]
# 1

Because the signatures for "show" are the same, there is only one show method to be implemented in Test.

As an example of interfaces that do this, see Set and Collection in java.util.

You "reintroduce" a method in an interface if you want to refine its specification.

So for example, Set adds set-like constaints on methods like add.

BigDaddyLoveHandlesa at 2007-7-29 14:05:12 > top of Java-index,Java Essentials,New To Java...
# 2

> what i want to do is to define the code for show() declared in second

Nothing to do but define it!

~

yawmarka at 2007-7-29 14:05:12 > top of Java-index,Java Essentials,New To Java...