Advantages of encapsulation in Java
Major advantages of encapsulation in Java are following −
- The fields of a class can be made read-only or write-only.
- A class can have total control over what is stored in its fields.
Published on 07-Feb-2018 10:16:03