Where is encapsulation used in Java?

Everything is an abstraction. Encapsulation is the process of hiding information details and protecting data and behavior of an object from misuse by other objects. In Java, encapsulation is done using access modifiers (public, protected, private) with classes, interfaces, setters, getters .

Sizin İçin Seçtik  What is in inheritance?

Leave a Reply

Your email address will not be published. Required fields are marked *