Advantages of encapsulation in Java

Java 8Object Oriented ProgrammingProgramming

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.
raja
Published on 07-Feb-2018 10:16:03
Advertisements