Non-static nested classes have access to _____________ from enclosing class.

Alvin Le

Member
Non-static nested classes have access to _____________ from enclosing class.
A. Private members
B. Protected members
C. Public members
D. All the members
 
Answer: d
Explanation: The non-static nested class can access all the members of the enclosing class. All the data members and member functions can be accessed from the nested class. Even if the members are private, they can be accessed.
 

Tìm kiếm

Back
Top