Instance of inner class can exist only _______________ enclosing class.

Instance of inner class can exist only _______________ enclosing class.
A. Within
B. Outside
C. Private to
D. Public to
 
Answer: a
Explanation: The class defined inside another class is local to the enclosing class. This means that the instance of inner class will not be valid outside the enclosing class. There is no restriction for instance to be private or public always.
 

Tìm kiếm

Back
Top