Visibility of the properties of class for different access modifiers
——————————————————————————————————————–
1) From the same class
Public , Protected, Private and Default
2) From any class in same package
Public, Protected and Default
3) From a subclass in same package
Public, Protected and Default
4) From subclass outside the same package
Public and Protected (by inheritance)
5) From any non-subclass or class outside the package
Public only