[Answer] What should we do to make a data member or a method member of a class visible only within the class?

The Question : What should we do to make a data member or a method member of a class visible only within the class?

Solution for the question :
To make a data member or method of a class visible only within the class. add the keyword private before its declaration.

The correct answer to the question is researched by our moderators and shared with you. You can give feedback by commenting for the answers you think are wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *