if we entend a inner class without outer class it shows an error.
But if we implements an inner interface without extending outer class didn't show an error.
if we extend outer class does the inner class automatically extend or not
if not then how can we extend the inner class.
class inter
{
interface a
{
void m1();
}
}
class interchild implements inter.a
{
public void m1()
{
}
public static void main(
String[] ar)
{
inter i=new inter();
i.m1();
}
}
this will not show any error if we change the inner interface with inner class and if we put "extends inter.<inner class name> " it shows an error
why?