What is the scope of a class nested inside another class?

Đăng Khánh

New member
What is the scope of a class nested inside another class?
A. Protected scope
B. Private scope
C. Global scope
D. Depends on access specifier and inheritance used
 
Answer: d
Explanation: It depends on the access specifier and the type of inheritance used with the class, because if the class is inherited then the nested class can be used by subclass too, provided it’s not of private type.
 

Tìm kiếm

Back
Top