Access Specifiers in java
4 types of Specifiers/Modifiers
1. Public: Highest scope, will be accessed within the same class, outside class same package, outside package but child class, outside package no relation ship.
2. Protected: Next Highest scope, will be accessed within the same class, outside class same package, outside package but child class.
3. Default: will be accessed within the same class, outside class same package.
4. Private: Least scope. will be accessed only within the same class
UML( unified modeling language)
Public -> +
Protected -> #
default -> ~
Private -> -
Comments
Post a Comment