Example of OOP Abstraction in Java
In OOP ( Object Oriented Programming ) Abstraction is a process hiding an implementation details from user , only the functionality will provided to user.
In Java Abstraction is achieved using Abstract classes and Interface.An abstract class is a class which is incomplete. You cannot create an instance of an abstract class in Java. They are provided to define default behavior and ensured that client of that class should adore to those contract which are defined inside the abstract class. In order to use it, you must extend and implement their abstract methods.
this repo will implement Employee Abstraction and Salary class the easy way.
first we create Employee class as abstract then we exntend salary class from Abstract class employee the we run the AbstactDemo class to know the result
the result are below