The data which you keep within yourself without revealing outside, is private. Say for example your "salary"
Whereas some information you may reveal without losing anything. for example, your name.
How do you have a control on its
visibility? There are certain
access modifiers to achieve the same. "private" and "public" are two among those and they help us in providing the control over the variables which represent the data we are interested in securing it.
Private - visible only to the class where it is present. same as your salary is only visible /known to you.
Public - visible to all public. Same as your name, Date of Birth etc.
Does that help?