Submit Your Site To The Web's Top 50 Search Engines for Free! Java Tutorial: Learn Java Basics For Free | Learn Java

Saturday, September 28, 2019

Encapsulation in Java - Learn Java

Encapsulation in Java - Learn Java

Encapsulation Real Time Example

Binding a data and corresponding method in a single unit is called encapsulation.
If any class follows data hiding and abstraction such type of class is called encapsulated class.


ENCAPSULATION= ABSTRACTION+DATA HIDING

The Main Advantage of Encapsulation.

  1. we can achieve security.
      2. it is improves maintainability and modularity of application.

The Main Disadvantage of Encapsulation.

    1.it is increases length of the code and slow down execution.

Every Data member should be declared as private and for every member we have to maintain 
 getter and setter method.


learn java online free and learn java programming this is the
best way to learn java. this is best java tutorial.in this tutorial          
all the programs start with hello java,hello world.Enterprise applications         
programming language

No comments:

Post a Comment

Java Inheritance Update 2023 With Program And Example

  Java Inheritance Update 2023 With Program And Example  nheritance is one of the essential concepts in object-orientated programming  (OOP)...