Hi,
Can we declare an inner class in abstract class?. i tried this and it complies,but i couldnt able to access that class.any way to access inner class? and what will be the use of doing so?
Here is the program which i tried it on my own...
abstract class AA
{
abstract void method();
class BB extends AA{
BB()
{
System.out.println("BB constr");
}
public void method()
{
System.out.println("method of BB");
}
}
}
class CC extends AA
{
CC()
{
System.out.println("CC contr");
}
public void method()
{
System.out.println("method of CC");
}
public static void main(
String args[])
{
CC c=new CC();
c.method();
//what can be added here to access innerclas
}
}
Please correct me if this is senseless...
Thanks in advance