i dont understand when u write sth like in.new extendsInnerJava(). What is actually happening? is it equvalent to
extendsInnerJava enj = new InnerJava();
ans secondly an Inner class is associated with an instance of the enclosing class and its just like non-static members, so how can we directly use this statement inside the main() as main() is a static content and extendsInnerJava class here is actually instance inside an instance. As you can see that if the code was
then we get a compilation error saying non-satic cant be accesed from static.