|
Doubt in simultaneous 'implementation' and 'extension'
////////// Start of code snippet ///////////////
interface i1
{
public void f1();
}
interface i2 extends i1
{
public void f2();
}
class c1 implements i1
{
public void f1(){}
}
// Error flashed for this class
class c2 implements i2 extends c1
{
public void f2(){}
}
///////////////////// End of code ///////////////////////////////
Now, this is what I assume ::
Since c2 is a derived class of c1, implementation of f1() must be visible in c2.
But the compiler says that implementation of f1() needs to be done.
What's wrong ??
|