[Java Core] - Access Modifiers
Tuesday, February 12, 2019
Access Modifiers
The Access Modifiers is a important part of Encapsulation in OOP. It will be limited access data from outside.
Example:
Download source code: Access Modifier
Source references:
1. https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/
The Access Modifiers is a important part of Encapsulation in OOP. It will be limited access data from outside.
Modifier | Class | Package | Subclass | Other Classes |
Private | Yes | No | No | No |
No modifier | Yes | Yes | No | No |
Protected | Yes | Yes | Yes | No |
Public | Yes | Yes | Yes | Yes |
Example:
![]() |
Example about access mofifiers |
Download source code: Access Modifier
Source references:
1. https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/
Bài liên quan
- [Java] - ORM on Java
- [Java] - Run Java App as a Service in Cent OS
- [Oracle] - JAVA and another one related JAVA
- [Java] - Spring Frame A -> Z
- [Java Core] - hashCode method
- [Java Design Pattern] [Creational Pattern] - Singleton
- [JAVA] - Java Solution
- [Java] - Encode/Decode Base64 String
- [Java Design Pattern] [Creational Pattern] - Factory Method
- [Java] - Predicate Interface
- [Java Design Pattern] - Creational Patterns
- [Java] - The Nashorn Engine
Comments[ 0 ]
Post a Comment