own class.
2. protected : Method or a variable can be accessible only to classes in the same Package.
3. public : Class, method, or variable can be accessible from any other class in the same package or other packages.
Same class - Public, Protected, and Private
Same-package & subclass - Public, Protected
Same Package & non-sub classes - Public, Protected
Different package & Sub classes - Public, Protected
Different package & non- sub classes - Public
No comments:
Post a Comment