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
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.