OOPS ABAP: Differences between Abstract class and interfaces

 Abstract classes:

  1. In Abstract class have at least one abstract method and others can non-abstract methods.
  2. Abstract methods can be public,private or protected.
  3. We need to redefine the  abstract method to implement the method in sub class. we can not redefine static methods.
  4. Multiple inheritance is not possible.


Interfaces:

  1. All methods are abstract methods in interfaces.
  2. All methods are public.
  3. No need to redefine method. we can write the code by clicking on source code button.
  4. Multiple inheritance is possible.


Comments

Popular posts from this blog

CDS Views: Table Functions with Example

Passing Dynamic Variables to SO10 TEXT

Adobe Form/PDF Form Introduction