Shannon




 
Shannon :: General :: General Talk :: What are the access modifiers in Java? - View Topic
Topic Rating: *****
Printable View
ishaa
New Member
*

Posts: 4
Status: Offline
Joined:  

Reputation: 0%  


pm
What are the access modifiers in Java? (9th Jan 25 at 7:30am UTC)
Java Course in Pune

Java provides four access modifiers for controlling the visibility of classes, methods, and variables. These are public.
Public: Accessible from any class in any package.
Protected: Available in the same package and to subclasses in other packages.
Default (Package-private): Accessible only from the same package; does not require a keyword.
Private: Accessible only within the declared class.
These access modifiers enforce encapsulation to the extent of restricting and providing access. For example, a private modifies data toward hiding it. A public permits access to any level with higher usage as well as making it clearly defined upon which interaction.
Know more- Java Course in Pune

ishaa
New Member
*

Posts: 4
Status: Offline
Joined:  

Reputation: 0%  


pm
Re: What are the access modifiers in Java? (9th Jan 25 at 7:30am UTC)
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
Java Course in Pune
Java Training in Pune
Java Classes in Pune
 Printable View

All times are GMT+0 :: The current time is 1:27pm
Page generated in 0.3114 seconds
Purchase Ad-Free Credits
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums