单选题:Which statement is true about a non-static inner class?
Which statement is true about a non-static inner class? @[B](2)
A. It must implement an interface.
B. It can access private instance variables in the enclosing object.
C. It is accessible from any other class.
D. It can only be instantiated in the enclosing class.
E. It must be final if it is declared in a method scope.
A.It must implement an interface.
B.It can access private instance variables in the enclosing object.
C.It is accessible from any other class.
D.It can only be instantiated in the enclosing class.
E.It must be final if it is declared in a method scope.
答案:B
A. It must implement an interface.
B. It can access private instance variables in the enclosing object.
C. It is accessible from any other class.
D. It can only be instantiated in the enclosing class.
E. It must be final if it is declared in a method scope.
A.It must implement an interface.
B.It can access private instance variables in the enclosing object.
C.It is accessible from any other class.
D.It can only be instantiated in the enclosing class.
E.It must be final if it is declared in a method scope.
答案:B