In a Java class a member ie a field or a method can have acc
Solution
Public Access Modifier: as the name suggested public that mean available and accessible to all, no restriction. So if a field, method is defined public that means any class or any method can use no matter if it’s defined in same package/class.
Protected Access Modifier: this one is protected which means accessible to a group only (in comparison to thing which is accessible to authorised group of people only). So if a field or method is defined protected then that can be used only by method and class where it is defined and classes defined in the same package not to all (defined outside the package)
Private Access Modifier: as the name suggests its private to the owner which is class in java, we can think in similar way like a thing which belongs just to owner and not shared with anyone. So if a field or method is defined private then it can be accessible only in class where it is defined.
