Whether it is possible to instantiate Inner Class by itself! If not, I have got the below coding in this forum. How they instantiate Inner Class like this myAA my= new myAA();
class AA
{
int x=123;
public int getMyVal()
{
return x;
}
}
public class Test10
{
public AA getRef()
{
final int x=90;
class myAA extends AA
{
public int getMyVal()
{
return x;
}
}
myAA my= new myAA();
return my;
}
public static void main (
String[] args)
{
Test10 t =new Test10();
AA a=t.getRef();
System.out.println("Value ---> "+a.getMyVal());
}
}