1.

Non-static nested classes have access to _____________ from enclosing class.(a) Private members(b) Protected members(c) Public members(d) All the members

Answer» The correct option is (d) All the members

The explanation is: 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.


Discussion

No Comment Found

Related InterviewSolutions