Monday, December 28, 2009

Java Access Modifiers/Access Level
































Access Level/Modifiers Public Protected Default Private
From the same class Yes Yes Yes Yes
From any class in the same package Yes Yes Yes No
From a subclass in the same package Yes Yes Yes No
From a subclass outside the same package Yes Yes, using inheritance No No
From a any non-subclass outside the package Yes No No No

No comments:

Total Pageviews