What ' s The difference between public and private access modifiers?

For now, lets focus on public and private modifiers. If you declare a field with a private access modifier, it can only be accessed within the same class: If you declare a field with a public access modifier, it is accessible for all classes: Why Access Modifiers?
For More Information Please Refer:


You May Also Like to Read: