Home / Questions / How are private members of a class different from public members?
Explanatory Question

How are private members of a class different from public members?

👁 101 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

private members of a class can only be accessed by other member methods of the same class whereas public members of a class can be accessed by methods of other classes as well.