Access Modifiers 2 – Static,Abstract,Final
Posted by Mantled with No comments
Abstract -
Final - variable is a constant; its value cannot be changed after its initialization.
Access Modifiers – Public, Private, Protected & Default
Posted by Mantled with No comments
Public - This is the least restrictive,accessible to entire project;
Default - If no access modifier is specified in the declaration, accessible only within package,not accessible in other packages or sub packages;
Protected - Accessible to all classes in the package and to all sub-classes of its class in any package where this class is visible.
Private -This is the most restrictive accessibility modifiers. These members are accessible only with in the same class.
Subscribe to:
Posts (Atom)