What is Abstraction in OOPS?

The meaning of abstract is existing in thoughts or as idea but not having a physical or concrete existence. It’s mainly used in design level. Abstract classes and interfaces are best examples for abstraction. We can specify the abstract actions which does not have an implementation in the same class but in the derived class.

public abstract class A
{
    Public abstract int Add(int a, int b);
}
Public class B : A 
{
    Public override int Add(int a, int b)
    { 
        Return a+b;
    }
}

Leave a Reply