posted 24 years ago
I think only E is correct in this case.
A)It must implement an interface. - FALSE. There is no such condition.
B)It is accessible from any other class. - FALSE.Not always.If we have a private non-static inner class then it is NOT accessible even if we do have an istance of the outer class available with us.
C)It can only be instantiated in the enclosing class - FALSE.It can be instantiated in any class if a reference to the enclosing class is available.It is true if we have a private non-static inner class , but that is not mentioned here.
D)It must be final if it is declared in a method scope. - FALSE.No such condition.
E)It can access private instance variables in the enclosing object. -TRUE.A non-static inner class can access private member variables of outer class.
------------------
Come on in !! Drinks are on the house in the Big Moose Saloon !!
Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform