Posts

Abstraction and Interfaces in Java

Image
Introduction: As we know that abstraction means only displaying functionality to users while hiding the technical implementation of the feature. i.e. what it works (showing), how it works (hiding). Both  abstract class  and  interface  are used for abstraction, so that Interface and Abstract Class are required prerequisites. Abstraction reduces the programming efforts and the complexity. An end-user using the application need not be concerned about how a particular feature is implemented. He/she can just use the features as required. As a result, in abstraction, we work with ideas rather than actual events. This means that we only reveal the functionality to the user and hide the implementation specifics from them. The user will only be aware of "what it does" as a result and not "how it does." What Is Abstract Class? A class which has the abstract keyword in its declaration is called abstract class. At least one abstract method must be present in abstract ...