Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
What are access modifiers?

Posted On: 26/09/2013 10:11:35
Access modifiers decide whether a method or a data variable can be accessed by another method in another class or subclass.
4 types of access modifiers:

Public: - Can be accessed by any other class anywhere.

Protected: - Can be accessed by classes inside the package or by subclasses ( that means classes who inherit from this class).

Private - Can be accessed only within the class. Even methods in subclasses in the same package do not have access.

Default - (Its private access by default) accessible to classes in the same package but not by classes in other packages, even if these are subclasses.
MOST VIEWED QUESTION:
 
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us