Explain how a private data of a base class can be accessed by publicly derived class?

1 answer

Answer

1263166

2026-09-18 12:20

+ Follow

The only way that private attributes of a base class can be accessed by a derived class (protected or public) is through a protected or public method in the base class.

The protected or public method is the interface through which access to the attributes is defined and controlled.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.