Antra interview question

Interface vs abstract class , what is encapsulation

Interview Answer

Anonymous

28 Aug 2019

encapsulation: 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.